http://d.puremagic.com/issues/show_bug.cgi?id=9408
Summary: invariant should be non-const by default and settable
to const
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Severity: enhancement
Priority: P2
Component: DMD
AssignedTo: [email protected]
ReportedBy: [email protected]
--- Comment #0 from Andrej Mitrovic <[email protected]> 2013-01-26
21:08:35 PST ---
class C1
{
int x;
invariant() const
{
x = 1; // not ok
}
}
class C2
{
int x;
invariant()
{
x = 1; // ok
}
}
See also https://github.com/D-Programming-Language/dmd/pull/1073,
and discussion http://forum.dlang.org/thread/jvh87s%241gl6%[email protected]
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------