[Issue 20039] New: ICE from double template instantiation with getMember of overload of class and template function
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Jul 10 12:04:49 UTC 2019
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: nobody at puremagic.com
Reporter: default_357-line at yahoo.de
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);
}
--
More information about the Digitalmars-d-bugs
mailing list