www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 21950] New: cod1: Assertion failure for noreturn parameter

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

          Issue ID: 21950
           Summary: cod1: Assertion failure for noreturn parameter
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: major
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: moonlightsentinel disroot.org

The following code triggers an assertion failure in the backend:

=========================================
alias noreturn = typeof(*null);

void foo(noreturn);

void overloads()
{
    noreturn n;
    foo(n);
}
=========================================

Assertion failed: 0, file src\dmd\backend\cod1.d, line 4214

--
May 21