[Issue 20602] New: [REG2.086] ICE on wrong code
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun Feb 23 21:05:37 UTC 2020
https://issues.dlang.org/show_bug.cgi?id=20602
Issue ID: 20602
Summary: [REG2.086] ICE on wrong code
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: regression
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: johanengelen at weka.io
Before 2.086 this code would simply error. But now it crashes the compiler.
```
import std;
auto ggg(Func)(Func func) { func(); }
nogc foo()() { }
void someOp(T)() {
try { }
catch foo;
try ggg(() => msg);
catch boo;
}
struct S(T) {
T slice() inout { someOp!int(); }
void opAssign()(U) {}
alias slice this;
}
struct ClusterInfo {
@UDA() UUID guid;
@UDA() S!(char) name;
}
```
The original code triggering the crash was much more complex, but the compiler
crashes at the same point. An assert is triggered; with LDC it is this assert:
https://github.com/ldc-developers/ldc/blob/d7b4b7db1cc69b3c3e356eeaf3c136a71fa2f516/dmd/expressionsem.d#L1669
--
More information about the Digitalmars-d-bugs
mailing list