http://d.puremagic.com/issues/show_bug.cgi?id=9669

           Summary: Throw in a pre-condition of a nothrow function
           Product: D
           Version: D2
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Keywords: accepts-invalid
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: [email protected]
        ReportedBy: [email protected]


--- Comment #0 from [email protected] 2013-03-08 12:12:26 PST ---
This code compiles with dmd 2.063alpha:


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



Then it throws at runtime:

[email protected](3)
---------
0x00402044 in nothrow void test.foo() at ...
...


I think that's bad because I think the "nothrow" tag used by the compiler to
better optimize functions.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to