[Issue 6982] immutability isn't respected on array assignment

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Nov 21 08:52:09 PST 2011


http://d.puremagic.com/issues/show_bug.cgi?id=6982


Trass3r <mrmocool at gmx.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|INVALID                     |


--- Comment #3 from Trass3r <mrmocool at gmx.de> 2011-11-21 08:51:18 PST ---
Yep, it breaks immutability:

        immutable(Bla[string]) _files = ["a":1, "b":2, "c":3];
        immutable(Bla)[string] files = _files;
        files.remove ("a");
        writeln(_files);
        writeln(files);

prints:

["b":2, "c":3]
["b":2, "c":3]

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list