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.
Comment #1 by k.hara.pg — 2015-11-15T07:47:30Z
Comment #2 by github-bugzilla — 2015-11-15T11:39:56Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/528cf6a222df936865e8b7b991ebac83bdf7dacd fix Issue 15340 - Spurious "overlapped default initialization" errors with auto fields https://github.com/D-Programming-Language/dmd/commit/b15e6c422a23c55ced054ad1bd593e41534f3b80 Merge pull request #5270 from 9rnsr/fix15340 Issue 15340 - Spurious "overlapped default initialization" errors with auto fields
Comment #3 by github-bugzilla — 2016-01-03T14:02:28Z
Commits pushed to stable at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/528cf6a222df936865e8b7b991ebac83bdf7dacd fix Issue 15340 - Spurious "overlapped default initialization" errors with auto fields https://github.com/D-Programming-Language/dmd/commit/b15e6c422a23c55ced054ad1bd593e41534f3b80 Merge pull request #5270 from 9rnsr/fix15340