[Issue 11542] New: scope(failure) messes up nothrow checking

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Nov 18 10:11:08 PST 2013


https://d.puremagic.com/issues/show_bug.cgi?id=11542

           Summary: scope(failure) messes up nothrow checking
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: andrei at erdani.com


--- Comment #0 from Andrei Alexandrescu <andrei at erdani.com> 2013-11-18 10:11:05 PST ---
This code compiles:

void fun() nothrow
{
    scope(failure) {}
    throw new Exception("so sue me");
}

Generally the presence of scope(failure) completely shuts down checking for
nothrow. See discussion in
http://forum.dlang.org/thread/l6ccae$2cmt$1@digitalmars.com?page=3#post-20131118183251.63faaba7:40marco-leise
for a sketch of the desirable/correct behavior.

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


More information about the Digitalmars-d-bugs mailing list