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
Comment #2 by github-bugzilla — 2018-04-24T06:55:11Z
Commits pushed to master at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/56e85cc59b594456bf56132ce2bcb73f559892a3 Fix Issue 17373 - traits getOverloads + multiple interface inheritance only see one of the interfaces' overloads https://github.com/dlang/dmd/commit/1848c70c977c1ee66dd1fdbd40c729fc5a18898d Merge pull request #7959 from RazvanN7/Issue_17373 Fix Issue 17373 - traits getOverloads + multiple interface inheritan… merged-on-behalf-of: Mike Franklin <[email protected]>
Comment #3 by dlang-bot — 2021-01-03T22:57:11Z
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