digitalmars.D.bugs - [Issue 19691] New: ICE on null default value for struct parameter in
- d-bugmail puremagic.com (35/35) Feb 21 2019 https://issues.dlang.org/show_bug.cgi?id=19691
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 puremagic.com Reporter: simen.kjaras 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) {} --
Feb 21 2019