http://d.puremagic.com/issues/show_bug.cgi?id=6630
Summary: Assigning null to class with nested alias this class is misinterpreted Product: D Version: D2 Platform: Other OS/Version: FreeBSD Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: d...@dawgfoto.de --- Comment #0 from d...@dawgfoto.de 2011-09-08 16:04:03 PDT --- version = Stage1; version = Stage2; class A { this() { b = new B(); } B b; alias b this; } class B { } void fun(A a) { a = null; version (Stage1) assert(a is null); } void main() { auto a = new A; assert(a.b !is null); fun(a); assert(a !is null); version (Stage2) assert(a.b !is null); } --- If you want to nullify an reference to a and assign null to it, instead a's reference to b is nullified. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------