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

          Issue ID: 23367
           Summary: can't `new` an empty array of bottom values
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: [email protected]
          Reporter: [email protected]

Compiled with a recent master DMD version, flags -preview=dip1000 -run

-----------------------------
@safe void main()
{ new noreturn[](0);
}
-----------------------------

This program crashes at runtime.

It should either compile and run succesfully, or fail compilation with
"statement has no effect" error. Reason for that is because no bottom values
are instantiated - the program is instantiating only an empty array.

--

Reply via email to