|--- |FIXED
--- Comment #6 from Dlang Bot ---
dlang/dmd pull request #15562 "Fix Issue 24117 - noreturn can be used as
expression" was merged into master:
- 46f1225eaeaf4332f5769ce5b1e3853d88ede527 by Nick Treleaven:
Fix Issue 24117 - noreturn can be used as expression
https://
https://issues.dlang.org/show_bug.cgi?id=24117
--- Comment #5 from Nick Treleaven ---
> enum E {e0 = 0, e1 = 1, illegal = noreturn}
> foreach (const i; 0 .. noreturn){}
I made a new fix that is more precise which does reject the 2 above and should
cover all cases.
--
https://issues.dlang.org/show_bug.cgi?id=24117
--- Comment #4 from Dlang Bot ---
@ntrel created dlang/dmd pull request #15562 "Fix Issue 24117 - noreturn can be
used as expression" fixing this issue:
- Fix Issue 24117 - noreturn can be used as expression
https://github.com/dlang/dmd/pull/15562
--
https://issues.dlang.org/show_bug.cgi?id=24117
--- Comment #3 from Basile-z ---
Example 2 was about the member initializer
Also if it's set to 0, then this becomes a problem because it's not expected to
have two members of the same value, e.g
```d
enum E {e0 = 0, e1 = 1, illegal = noreturn}
created dlang/dmd pull request #15561 "Fix Issue 24117 - noreturn can be
used as expression" fixing this issue:
- Fix Issue 24117 - noreturn can be used as expression
https://github.com/dlang/dmd/pull/15561
--
https://issues.dlang.org/show_bug.cgi?id=24117
Nick Treleaven changed:
What|Removed |Added
CC||n...@geany.org
--- Comment #1 from Nick