digitalmars.D.bugs - [Issue 1873] New: structs with at least one immutable member are completely immutable
- d-bugmail puremagic.com (25/25) Feb 27 2008 http://d.puremagic.com/issues/show_bug.cgi?id=1873
- d-bugmail puremagic.com (9/9) Mar 06 2008 http://d.puremagic.com/issues/show_bug.cgi?id=1873
http://d.puremagic.com/issues/show_bug.cgi?id=1873 Summary: structs with at least one immutable member are completely immutable Product: D Version: 2.011 Platform: PC OS/Version: All Status: NEW Keywords: rejects-valid Severity: normal Priority: P2 Component: DMD AssignedTo: bugzilla digitalmars.com ReportedBy: ludwig informatik.uni-luebeck.de The following code fails to compile, although 'x' should be mutable: struct S { invariant int dummy; // const gives the same result int x; } int main(){ S s; s.x = 1; // error: cannot modify struct with immutable members return 0; } --
Feb 27 2008
http://d.puremagic.com/issues/show_bug.cgi?id=1873 bugzilla digitalmars.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED Fixed dmd 2.012 --
Mar 06 2008