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

          Issue ID: 12766
           Summary: Forward reference diagnostics must emit the offending
                    line causing the forward reference
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Keywords: diagnostic
          Severity: major
          Priority: P1
         Component: DMD
          Assignee: [email protected]
          Reporter: [email protected]

-----
struct A
{
    B b;  // L3
}

struct B // L6
{
    A a;  // L8
}

void main() { }
-----

$ test.d(6): Error: struct test.B no size yet for forward reference

This is a completely useless diagnostic, it doesn't tell me *what code* caused
the forward reference. It should either reference L3 or L8, not the line of the
beginning of the struct definition.

--

Reply via email to