An example: import std.stdio; struct S { int i; ~this() { i = -1;} } void main() { int delegate() dg; { S s; dg = () { return s.i; }; writeln(dg()); // 0 } writeln(dg()); // -1 } Allowing access to a destroyed variable where a destructor has invalidated the object should not be allowed. Prior to 2.053, this was an error. According to Paul Backus, the responsible PR was this: https://github.com/dlang/dmd/pull/5292 One who has created a delegate would probably expect that when calling the delegate at a later time, the state of the object should be preserved, and not destroyed. For some cases, it might be dangerous safety-wise to use an object after destruction. Fixing this issue probably requires a long deprecation period, as no doubt code that depends on this (or works in spite of the dangers) exists today.
*** This issue has been marked as a duplicate of issue 15952 ***