New behaviour for field assignment to existing non-struct variable in r2016a?
Afficher commentaires plus anciens
Hello,
Given the input
tmp = 'test'
tmp.test = 'test'
In r2015b I get the warning:
Warning: Struct field assignment overwrites a value with class "char".
However in r2016a, I get the following error:
Field assignment to non-structure array object
Has the default behaviour changed? Has this been notified somewhere? It seems like this will break a lot of existing code which relies on the more permissive earlier behaviour.
1 commentaire
Adam
le 15 Juin 2016
I guess this is one of the many good reasons not to rely on code that is throwing warnings if there are easy ways to fix them.
Réponse acceptée
Plus de réponses (1)
Ben
le 15 Juin 2016
0 votes
Catégories
En savoir plus sur MATLAB dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!