https://issues.dlang.org/show_bug.cgi?id=20039
Issue ID: 20039
Summary: ICE from double template instantiation with getMember
of overload of class and template function
Product: D
Version: D2
Hardware: x86_64
OS: Linux
Status: NEW
Severity: normal
Priority: P1
Component: dmd
Assignee: [email protected]
Reporter: [email protected]
Consider the following code:
void foo()() { }
class bar { }
alias bug = foo;
alias bug = bar;
template Identity(T...) { }
alias member1 = Identity!(__traits(getMember, mixin(__MODULE__), "bug"));
alias member2 = Identity!(__traits(getMember, mixin(__MODULE__), "bug"));
With this, DMD crashes, because it cannot determine the type of "bug" to see if
the template parameters are equal.
Note that with this variation, a different crash ensues:
void main() {
alias member1 = Identity!(.bug);
alias member2 = Identity!(.bug);
}
--