www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 22389] New: noreturn functions are allowed to return normally

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

          Issue ID: 22389
           Summary: noreturn functions are allowed to return normally
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: major
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: moonlightsentinel disroot.org

The following code is accepted despite foo violating the contract of noreturn:

noreturn foo() {}

--
Oct 15 2021