https://issues.dlang.org/show_bug.cgi?id=19691
Issue ID: 19691
Summary: ICE on null default value for struct parameter in
constructor
Product: D
Version: D2
Hardware: x86
OS: Windows
Status: NEW
Keywords: ice
Severity: normal
Priority: P1
Component: dmd
Assignee: [email protected]
Reporter: [email protected]
This code:
struct S1 {
this(T...)(T) {
S2("");
}
}
struct S2 {
this(string) {}
this(S1 s = null) {}
}
Crashes the compiler (2.084.1). I've not been able to reduce it to a simple
overload problem. That is, this does not exhibit the same issue:
struct S1 {
this(T...)(T) {
fun("");
}
}
void fun(S1 s = null) {}
void fun(string s) {}
--