[Issue 9408] New: invariant should be non-const by default and settable to const
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Jan 26 21:08:37 PST 2013
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: andrej.mitrovich at gmail.com
ReportedBy: andrej.mitrovich at gmail.com
--- Comment #0 from Andrej Mitrovic <andrej.mitrovich at gmail.com> 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%241@digitalmars.com
--
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