[Issue 23331] New: implicit cast from noreturn crashes compiler in various ways
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Sep 10 20:57:10 UTC 2022
https://issues.dlang.org/show_bug.cgi?id=23331
Issue ID: 23331
Summary: implicit cast from noreturn crashes compiler in
various ways
Product: D
Version: D2
Hardware: x86_64
OS: Linux
Status: NEW
Severity: critical
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: Ajieskola at gmail.com
Defining any of these three functions in latest master will crash the compiler:
--------
auto fun(){return double(new noreturn[](0)[0]);}
auto gun(){return double(assert(0));}
auto hun(){return int(assert(0));}
--------
The underlying reason may or may not be same, since a different assertion trips
in the compiler for each, located in different a source file for each of them.
--
More information about the Digitalmars-d-bugs
mailing list