www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 22387] New: Noreturn init loses type qualifiers


          Issue ID: 22387
           Summary: Noreturn init loses type qualifiers
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: moonlightsentinel disroot.org

The initializer generated by noreturn.init is missing qualifiers when using
const noreturn, ...:

Only the first assert passes:

static assert(is(typeof(noreturn.init) == noreturn));
static assert(is(typeof((const noreturn).init) == const noreturn));
static assert(is(typeof((immutable noreturn).init) == immutable noreturn));
static assert(is(typeof((shared noreturn).init) == shared noreturn));

Oct 14 2021