http://d.puremagic.com/issues/show_bug.cgi?id=3048
Summary: out and invariant contracts is not working for const(C) classes Product: D Version: 2.028 Platform: Other OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: bugzi...@digitalmars.com ReportedBy: bary...@smp.if.uj.edu.pl Hi, This code doesn't compile: class A { } const(A) func() out (res) { assert(true); } body { return new A; } And this one: class A { const(A) func() out (res) { assert(true); } body { return new A; } } And this one: class A { invariant { assert(true); } const(A) func(){ return new A; } } // this is especially strange, considering the fact that contracts are supposed to be designed as free of side effects. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------