[Issue 8150] New: Throwing nothrow struct constructor?

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri May 25 13:55:03 PDT 2012


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

           Summary: Throwing nothrow struct constructor?
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: accepts-invalid
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: bearophile_hugs at eml.cc


--- Comment #0 from bearophile_hugs at eml.cc 2012-05-25 13:56:47 PDT ---
This compiles with no errors:


struct Foo {
    this(int) nothrow {
        throw new Exception("something");
    }
}
void main() {
    Foo(1);
}



DMD 2.060alpha gives at run-time:

object.Exception at test.d(3): something

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


More information about the Digitalmars-d-bugs mailing list