https://issues.dlang.org/show_bug.cgi?id=15195

--- Comment #1 from [email protected] ---
The compiler actually allocates a closure (so unlike the other DIP25 bug
reports, there is no memory corruption here.)

I'm not sure what the intended behaviour is.
The closure is allocated even in the following case:

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

--

Reply via email to