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

          Issue ID: 12829
           Summary: Wrong error line number for closure allocation in
                    @nogc function
           Product: D
           Version: D2
          Hardware: x86
                OS: Windows
            Status: NEW
          Keywords: diagnostic
          Severity: normal
          Priority: P1
         Component: DMD
          Assignee: [email protected]
          Reporter: [email protected]

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


DMD 2.066alpha gives a bad line number that doesn't help me locate where the
closure is defined or created inside the main function:

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

--

Reply via email to