www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 13501] New: Crash with throwing in scope(failure) after

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

          Issue ID: 13501
           Summary: Crash with throwing in scope(failure) after throwing
                    in scope(success)
           Product: D
           Version: D2
          Hardware: x86
                OS: Windows
            Status: NEW
          Keywords: EH, wrong-code
          Severity: critical
          Priority: P1
         Component: DMD
          Assignee: nobody puremagic.com
          Reporter: thecybershadow gmail.com

///////////////////// test.d /////////////////////
int careful()
{
    scope(failure) throw new Exception("Failure");
    scope(success) throw new Exception("Success");
    return victim();
}

int victim()
{
    return 0;
}

void main()
{
    careful();
}
//////////////////////////////////////////////////

--
Sep 19 2014