Bug 15428 – __traits(compiles, super()) cause error "multiple constructor calls" later

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2015-12-09T08:33:00Z
Last change time
2017-03-22T12:21:18Z
Assigned to
nobody
Creator
ketmar
See also
https://issues.dlang.org/show_bug.cgi?id=16468

Comments

Comment #0 by ketmar — 2015-12-09T08:33:34Z
compiling the following code produces "multiple constructor calls" error: class A { this () {} } class B : A { this () { static if (__traits(compiles, super())) super(); } } `compiles` trait should not either set or check `parent constructor called` flag.
Comment #1 by ketmar — 2015-12-09T08:34:57Z
p.s. or, maybe, it should only check that flag, but never change.
Comment #2 by bitter.taste — 2017-01-17T15:36:06Z
*** Issue 16468 has been marked as a duplicate of this issue. ***
Comment #3 by bitter.taste — 2017-01-17T18:29:27Z
Comment #4 by github-bugzilla — 2017-02-11T18:27:30Z
Commits pushed to master at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/d23913c8971766a461e2a973dd9c7fccbad90793 Fix issue 15428 - Properly detach the temporary scope for compiles() https://github.com/dlang/dmd/commit/0689490b0f40d2cfbf9492925fde28f1a3b2e312 Merge pull request #6462 from LemonBoy/b15428 Fix issue 15428 - Properly detach the temporary scope for compiles()
Comment #5 by github-bugzilla — 2017-02-24T20:34:20Z
Commits pushed to newCTFE at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/d23913c8971766a461e2a973dd9c7fccbad90793 Fix issue 15428 - Properly detach the temporary scope for compiles() https://github.com/dlang/dmd/commit/0689490b0f40d2cfbf9492925fde28f1a3b2e312 Merge pull request #6462 from LemonBoy/b15428
Comment #6 by github-bugzilla — 2017-03-22T12:21:18Z
Commits pushed to stable at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/d23913c8971766a461e2a973dd9c7fccbad90793 Fix issue 15428 - Properly detach the temporary scope for compiles() https://github.com/dlang/dmd/commit/0689490b0f40d2cfbf9492925fde28f1a3b2e312 Merge pull request #6462 from LemonBoy/b15428