[Issue 19691] New: ICE on null default value for struct parameter in constructor
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Feb 21 14:34:09 UTC 2019
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: nobody at puremagic.com
Reporter: simen.kjaras at gmail.com
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) {}
--
More information about the Digitalmars-d-bugs
mailing list