[Issue 24117] noreturn can be used as expression

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Aug 28 10:05:00 UTC 2023


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

Nick Treleaven <nick at geany.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |nick at geany.org

--- Comment #1 from Nick Treleaven <nick at geany.org> ---
This code:

    auto e = noreturn + 1;

Gets lowered to:

        int e = 1;

Also, `cast(int) E.illegal` is 0.

--


More information about the Digitalmars-d-bugs mailing list