digitalmars.D.bugs - [Issue 5341] New: alias this ignores invariant()
- d-bugmail puremagic.com (29/29) Dec 10 2010 http://d.puremagic.com/issues/show_bug.cgi?id=5341
- d-bugmail puremagic.com (13/13) Jan 20 2012 http://d.puremagic.com/issues/show_bug.cgi?id=5341
http://d.puremagic.com/issues/show_bug.cgi?id=5341 Summary: alias this ignores invariant() Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: minor Priority: P2 Component: DMD AssignedTo: nobody puremagic.com ReportedBy: simen.kjaras gmail.com PST --- struct foo { int data; alias data this; invariant() { assert( data == 0 ); } } void bar( ) { foo f; f = 4; // No assert } Not sure if this will ever be fixed, or even is supposed to, but I feel it is worth adding here. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Dec 10 2010
http://d.puremagic.com/issues/show_bug.cgi?id=5341 Walter Bright <bugzilla digitalmars.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |bugzilla digitalmars.com Resolution| |INVALID 13:42:39 PST --- Struct invariants are checked upon method entry and exit, they are not checked when fields are modified otherwise. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jan 20 2012