Bug 15340 – Spurious "overlapped default initialization" errors with auto fields
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2015-11-15T07:43:00Z
Last change time
2016-01-03T14:02:28Z
Keywords
diagnostic, pull
Assigned to
nobody
Creator
k.hara.pg
Comments
Comment #0 by k.hara.pg — 2015-11-15T07:43:42Z
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.