[Issue 18947] New: No way to get list of overloads from template mixins
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Jun 5 13:17:42 UTC 2018
https://issues.dlang.org/show_bug.cgi?id=18947
Issue ID: 18947
Summary: No way to get list of overloads from template mixins
Product: D
Version: D2
Hardware: x86
OS: Windows
Status: NEW
Severity: normal
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: simen.kjaras at gmail.com
mixin template foo(T) {
void fun(T) {}
}
struct S {
mixin foo!int;
mixin foo!string;
}
unittest {
static assert(__traits(compiles, __traits(getMember, S, "fun")));
static assert(__traits(getOverloads, S, "fun").length == 0);
S s;
s.fun(3);
}
Somehow the call to s.fun compiles, but trying to get the list of overloads
fails.
--
More information about the Digitalmars-d-bugs
mailing list