[Issue 22373] New: Glue layer rejects cast from noreturn to other type

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Oct 9 23:40:38 UTC 2021


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

          Issue ID: 22373
           Summary: Glue layer rejects cast from noreturn to other type
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: moonlightsentinel at disroot.org

Example:

=================================
void cast_()
{
    noreturn n;
    int i = n;
}
=================================
example.d(4): Error: e2ir: cannot cast `n` of type `noreturn` to type `int`

--


More information about the Digitalmars-d-bugs mailing list