On 6/18/12 2:14 AM, Mehrdad wrote:
Okay, how about this? http://ideone.com/VMlzSDoes this break const? import std.stdio; class S { this(int a) { this.a = a; this.increment = { this.a++; }; } int a; void delegate() increment; void oops() const { this.increment(); } } void main() { auto c = new const(S)(0); writeln(c.a); c.oops(); writeln(c.a); }
Yes. Currently the constructor is not typechecked properly. Kenji has done some work on that and is still blocked by me and Walter with some questions.
Andrei
