You don't even need to make a copy to show problems, the context isn't passed by reference:const r1 = dg(); const r2 = dg();assert(r1 == 43 && r2 == 44); // would fail with optimization. -Steve
This depends on the implementation; assuming that captured `x` represents the `*cast(int*) context` lvalue, this example would work.
