https://issues.dlang.org/show_bug.cgi?id=24114
Issue ID: 24114
Summary: no crash on use of a noreturn enum member
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Keywords: wrong-code
Severity: normal
Priority: P1
Component: dmd
Assignee: [email protected]
Reporter: [email protected]
For the following code there's no runtime crash
```
enum E {e1 = 1, e2 = 2, illegal = noreturn}
void main()
{
E e;
// that assignment should have the same effect as assert(0)
e = E.illegal;
// just to be sure
if (e) {}
}
```
--