[Issue 22364] Unreachable warning for collectException[Msg] with noreturn value

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Oct 8 11:49:55 UTC 2021


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

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/phobos pull request #8264 "Fix 22364 - Omit unreachable `return` in
collectException[Msg]..." was merged into master:

- fac622655b0b904b717bed7e760ced58ca269315 by MoonlightSentinel:
  Fix 22364 - Omit unreachable `return` in collectException[Msg]...

  ...when instantiated with `noreturn`.

  DMD is able to determine that a lazy `noreturn` expression will interrupt
  the normal control flow (throw / halt / ...) s.t. it never reaches the
  `return`.

https://github.com/dlang/phobos/pull/8264

--


More information about the Digitalmars-d-bugs mailing list