Consider the following code:
void foo()@nogc{
int x;
struct S{ int bar()@nogc{ return x; } }
S s;
}
Error: function foo @nogc function allocates a closure with the GC
No closure should be allocated here and in similar cases.
Comment #1 by robert.schadek — 2024-12-13T18:45:27Z