www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 22386] New: Unreachable warning for assertThrown with


          Issue ID: 22386
           Summary: Unreachable warning for assertThrown with noreturn
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: phobos
          Assignee: nobody puremagic.com
          Reporter: moonlightsentinel disroot.org

Passing a noreturn value to assertThrown triggers an unreachable statement
warning, e.g.

noreturn throwEx() { throw new Exception(""); }

std/exception.d(297): Warning: statement is not reachable

Oct 14 2021