The following code used to compile with -dip1000 but no longer does since DMD2.080: ``` @nogc void g(T)(scope T args) {} @nogc void foo(T)(scope T args) { scope dg = () { g(args); }; } void main() { foo("hoi"); } ``` dmd -dip1000 onlineapp.d: onlineapp.d(3): Error: function `onlineapp.foo!string.foo` is `@nogc` yet allocates closures with the GC onlineapp.d(4): onlineapp.foo!string.foo.__lambda2 closes over variable args at onlineapp.d(3) onlineapp.d(8): Error: template instance `onlineapp.foo!string` error instantiating
Fixed by https://github.com/dlang/dmd/pull/11006
@WalterBright updated dlang/dmd pull request #11006 "fix Issue 20596 - [REG2.086] Error on missed stack allocation for clo…" fixing this issue: - fix Issues 20596, 20597 - Error on missed stack allocation for closure for template https://github.com/dlang/dmd/pull/11006
dlang/dmd pull request #11006 "fix Issues 20596, 20967 - [REG2.086] Error on missed stack allocation for clo…" was merged into master: - 3d746b956b85d07646fe901d5e705306ab5027b9 by Walter Bright: fix Issues 20596, 20597 - Error on missed stack allocation for closure for template https://github.com/dlang/dmd/pull/11006