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

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Oct 7 19:39:57 UTC 2021


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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull

--- Comment #1 from Dlang Bot <dlang-bot at dlang.rocks> ---
@MoonlightSentinel created dlang/phobos pull request #8264 "Fix 22364 - Omit
unreachable `return` in collectException[Msg]..." fixing this issue:

- 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