[Issue 24462] New: scope(failure) with a throw expression breaks safety
    d-bugmail at puremagic.com 
    d-bugmail at puremagic.com
       
    Thu Mar 28 16:46:34 UTC 2024
    
    
  
https://issues.dlang.org/show_bug.cgi?id=24462
          Issue ID: 24462
           Summary: scope(failure) with a throw expression breaks safety
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Keywords: accepts-invalid, safe
          Severity: critical
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: elpenguino+D at gmail.com
```
void main() @safe { 
    try {
        scope(failure) throw new Exception("");
        assert(0);
    } catch (Exception) {}
}
```
Essentially the same issue as https://issues.dlang.org/show_bug.cgi?id=24460
--
    
    
More information about the Digitalmars-d-bugs
mailing list