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

          Issue ID: 15340
           Summary: Spurious "overlapped default initialization" errors
                    with auto fields
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Keywords: diagnostic
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: [email protected]
          Reporter: [email protected]

Test case:

module test;
class C
{
    auto a = undef1;
    auto b = undef2;
}

`dmd -o- test` prints:

test.d(4): Error: undefined identifier 'undef1'
test.d(5): Error: undefined identifier 'undef2'
test.d(2): Error: overlapping default initialization for field b and a
test.d(2): Error: overlapping default initialization for field a and b

The last two errors should not be reported.

--

Reply via email to