August 27, 2023 [Issue 24117] New: noreturn can be used as expression | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=24117 Issue ID: 24117 Summary: noreturn can be used as expression Product: D Version: D2 Hardware: All OS: All Status: NEW Keywords: accepts-invalid Severity: normal Priority: P1 Component: dmd Assignee: nobody@puremagic.com Reporter: b2.temp@gmx.com Example 1, in an AddExpression: ```d int v(e)() { return e + 0; } int main() { return v!(noreturn)(); } ``` Example 2, as EnumMember initializer: ```d enum E {e1 = 1, e2 = 2, illegal = noreturn} void main() { E e; e = E.illegal; } ``` -- |
Copyright © 1999-2021 by the D Language Foundation