[Issue 17373] New: traits getOverloads + multiple interface inheritance only see one of the interfaces' overloads

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Fri May 5 15:21:15 PDT 2017


https://issues.dlang.org/show_bug.cgi?id=17373

          Issue ID: 17373
           Summary: traits getOverloads + multiple interface inheritance
                    only see one of the interfaces' overloads
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: mathias.lang at sociomantic.com

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).

--


More information about the Digitalmars-d-bugs mailing list