Bug 17373 – traits getOverloads + multiple interface inheritance only see one of the interfaces' overloads
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2017-05-05T22:21:15Z
Last change time
2021-01-03T22:57:11Z
Assigned to
No Owner
Creator
Mathias Lang
Comments
Comment #0 by mathias.lang — 2017-05-05T22:21:15Z
Tested with 2.074 / master as of today:
```
interface Foo { void visit (int); }
interface Bar { void visit (double); }
interface FooBar : Foo, Bar {}
pragma(msg, __traits(getOverloads, FooBar, "visit").length);
```
Outputs `1LU`, which is incorrect as both will be part of the overload set.
This breaks reflection code which tries to auto-instantiate interfaces (like Blackhole / whitehole).
Comment #1 by razvan.nitu1305 — 2018-02-26T13:36:15Z
dlang/dmd pull request #12093 "[dmd-cxx] Backport more recent traits to the C++ port" was merged into dmd-cxx:
- 40ea03789d2b93aea1b2786c349bf17f6800eab4 by RazvanN7:
[dmd-cxx] Fix Issue 17373 - traits getOverloads + multiple interface inheritance only see one of the interfaces'
overloads
https://github.com/dlang/dmd/pull/12093