December 30, 2022 [Issue 23591] New: [REG 2.101] Invalid casts accepted by the compiler if from type is noreturn | ||||
---|---|---|---|---|
| ||||
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 -- |
Copyright © 1999-2021 by the D Language Foundation