[Issue 21993] Cannot cast to noreturn

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Jun 7 09:25:23 UTC 2021


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

Dlang Bot <dlang-bot at dlang.rocks> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #2 from Dlang Bot <dlang-bot at dlang.rocks> ---
dlang/dmd pull request #12633 "Fix 21993 - Implement cast(noreturn)" was merged
into stable:

- 7bca3a660cdf02f2e9b983497c1442c6a269bc63 by MoonlightSentinel:
  Fix 21993 - Implement cast(noreturn)

  Rewrite `cast(<qual> noreturn) <exp>` as `<exp>, assert(false)`.

  DIP:
  > Every type is allowed to be explicitly cast to noreturn. (Not to be
  > confused with noreturn implicitly casting to every type.) It generates
  > an assert(0):

https://github.com/dlang/dmd/pull/12633

--


More information about the Digitalmars-d-bugs mailing list