[Issue 12829] Wrong error line number for closure allocation in @nogc function

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Mon Jun 2 05:19:16 PDT 2014


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

--- Comment #1 from bearophile_hugs at eml.cc ---
This reports only one closure:


void main() @nogc {
    int x;
    void delegate() @nogc foo;
    foo = () {
        int y = x;
    };
    void delegate() @nogc bar;
    bar = () {
        int y = x;
    };
}


test.d(1,6): Error: function D main @nogc function allocates a closure with the
GC

--


More information about the Digitalmars-d-bugs mailing list