https://issues.dlang.org/show_bug.cgi?id=22364
Issue ID: 22364
Summary: Unreachable warning for collectException[Msg] with
noreturn value
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P1
Component: phobos
Assignee: [email protected]
Reporter: [email protected]
Passing a noreturn value to either collectException or collectExceptionMsg
triggers the "statement is not reachable" warning for the additional return
statement when no exception is thrown.
Examples:
noreturn foo() { throw new Exception(""); }
collectException!(Exception, noreturn)(foo());
noreturn n;
collectException!(Exception, noreturn)(foo(), n);
collectExceptionMsg!(Exception, noreturn)(foo());
--