[Issue 5397] New: Compiler error on struct with invariant and postblitz
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Jan 1 13:14:47 PST 2011
http://d.puremagic.com/issues/show_bug.cgi?id=5397
Summary: Compiler error on struct with invariant and postblitz
Product: D
Version: D2
Platform: Other
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: alex.khmara at gmail.com
--- Comment #0 from Alex Khmara <alex.khmara at gmail.com> 2011-01-01 13:12:38 PST ---
This code:
module properties;
struct PropertyList {
invariant() {
assert(1);
}
this(this) {
_props = [];
}
string[] _props;
}
gives compiler error:
Error: __result = this is not mutable
Error: __result = this is not an lvalue
Without invariant all works good.
--
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