www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 7224] New: Throwing precondition of nothrow function

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

           Summary: Throwing precondition of nothrow function
           Product: D
           Version: D2
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Keywords: accepts-invalid
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: bearophile_hugs eml.cc



This function compiles with no errors with DMD 2.058head:


bool foo() {
    throw new Exception("");
}
void main() nothrow
in {
    assert(foo());
} body {}


but main() raises an exception (main() doesn't raise an exception in release
mode).
I think this is a problem.

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