Problem with the affectation cmde "=" applied to a "list of struct" in scilab 6.0.0 beta 1
Reported by labergri
BUG DESCRIPTION:
----------------
Modification of an element (of type struct) of a list seems to modify an other one also.
ERROR LOG:
----------
--> lst=list();
--> lst(1)=struct("f",[1,2]);
--> lst(1).f //should be [1,2], OK
ans =
1. 2.
-->
--> lst(2)=lst(1);
--> lst(2).f(2)=3;
-->
--> lst(1).f //should be [1,2] but it gives [1,2] in scilab 6.0.0 beta 1
ans =
1. 3.
!!!!! NO ERROR BUT WRONG RESULT !!!!!!!!!
--> lst(2).f //should be [1,3], OK
ans =
1. 3.
HOW TO REPRODUCE THE BUG:
-------------------------
lst=list();
lst(1)=struct("f",[1,2]);
lst(1).f //should be [1,2], OK
lst(2)=lst(1);
lst(2).f(2)=3;
lst(1).f //should be [1,2] but it gives [1,2] in scilab 6.0.0 beta 1
lst(2).f //should be [1,3], OK
OTHER INFORMATION:
------------------
It works in Scilab v6.0.0 alpha 2 and v5.5.1
Similarities with bug 14253 (even if this bug seems solved in v6.0.0 beta 1)