digitalmars.D.bugs - [Issue 23591] New: [REG 2.101] Invalid casts accepted by the
- d-bugmail puremagic.com (26/26) Dec 30 2022 https://issues.dlang.org/show_bug.cgi?id=23591
https://issues.dlang.org/show_bug.cgi?id=23591 Issue ID: 23591 Summary: [REG 2.101] Invalid casts accepted by the compiler if from type is noreturn Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: regression Priority: P1 Component: dmd Assignee: nobody puremagic.com Reporter: ibuclaw gdcproject.org This nonsense is compilable. --- noreturn square(int x); int example(int i) { int x = cast(string)square(i); int y = cast(real function(char))assert(0); return x + y; } --- Introduced by https://github.com/dlang/dmd/pull/14494 --
Dec 30 2022