http://d.puremagic.com/issues/show_bug.cgi?id=9993
Summary: const ctor should be preferred than mutable for const obj creation Product: D Version: D2 Platform: All OS/Version: All Status: NEW Keywords: wrong-code Severity: major Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: k.hara...@gmail.com --- Comment #0 from Kenji Hara <k.hara...@gmail.com> 2013-04-25 23:56:29 PDT --- This code should work, but currently fails at the last assertion in runtime. class B { int x; this() const { x = 42; } this() { x = 13; } } void main() { const B mb = new B; assert(mb.x == 13); const B cb = new const B; assert(cb.x == 42); // fails! } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------