http://d.puremagic.com/issues/show_bug.cgi?id=8955
--- Comment #1 from Denis Shelomovskij <verylonglogin....@gmail.com> 2012-11-03 17:25:18 MSK --- Partial workaround: For const/immutable postblit/dtor: --- struct S { private void myPostblit() { } this(this) inout { (cast(S*) &this).myPostblit(); } private void myDtor() { } ~this() inout // Plese `inout` before `~this()` if Issue 8953 unfixed { (cast(S*) &this).myDtor(); } } struct S_ { const S sc; immutable S si; } --- Note: at least `this(this) inout { }` or `opAssign` is required for dtor For shared dtor: --- struct S { void opAssign(shared S s) shared { this = s; } // required for dtor private void myDtor() { } shared~this() // Plese `inout` before `~this()` if Issue 8953 unfixed { (cast(S*) &this).myDtor(); } } struct S_ { shared S sc; } --- Same for constructor except it doesn't require somebody like dtor. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------