[Issue 23367] New: can't `new` an empty array of bottom values
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Sep 24 11:27:27 UTC 2022
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: nobody at puremagic.com
Reporter: Ajieskola at gmail.com
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.
--
More information about the Digitalmars-d-bugs
mailing list