New behaviour for field assignment to existing non-struct variable in r2016a?
Show older comments
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 Comment
Adam
on 15 Jun 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.
Accepted Answer
More Answers (1)
Ben
on 15 Jun 2016
0 votes
Categories
Find more on MATLAB Compiler in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!