www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 13123] New: Disallow throwing contracts for nothrow functions

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

          Issue ID: 13123
           Summary: Disallow throwing contracts for nothrow functions
           Product: D
           Version: D2
          Hardware: x86
                OS: Windows
            Status: NEW
          Keywords: accepts-invalid
          Severity: normal
          Priority: P1
         Component: DMD
          Assignee: nobody puremagic.com
          Reporter: bearophile_hugs eml.cc

dmd 2.066beta3 compiles this code:


void foo() nothrow
in {
    throw new Exception(null);
} body {
}
void main() {}

--
Jul 13 2014