[Issue 24117] noreturn can be used as expression

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Aug 28 13:48:01 UTC 2023


https://issues.dlang.org/show_bug.cgi?id=24117

--- Comment #3 from Basile-z <b2.temp at gmx.com> ---
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} 
```

Otherwise I have a 3rd example:

```d
void main()
{
    foreach (const i; 0 .. noreturn){}
} 
```

--


More information about the Digitalmars-d-bugs mailing list