http://d.puremagic.com/issues/show_bug.cgi?id=4500
Summary: scoped moves class after calling the constructor Product: D Version: D2 Platform: Other OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: Phobos AssignedTo: and...@metalanguage.com ReportedBy: kamm-removet...@incasoftware.de --- Comment #0 from Christian Kamm <kamm-removet...@incasoftware.de> 2010-07-23 23:59:57 PDT --- As far as I remember a class is not supposed to move. class A { this() { a = this; } this(int i) { a = this; } A a; void check() { writeln(this is a); } } void main() { auto a1 = scoped!A; a1.check(); // fails auto a2 = scoped!A(1); a2.check(); // fails a1.a = a1; a1.check(); // ok now } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------