[Issue 24463] New: scope(failure) with a break/continue breaks safety

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Mar 28 16:48:25 UTC 2024


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

          Issue ID: 24463
           Summary: scope(failure) with a break/continue 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 { 
    do {
        scope(failure) break;
        assert(0);
    } while(0);
}
```
```
void main() @safe { 
    do {
        scope(failure) continue;
        assert(0);
    } while(0);
}
```

Essentially the same issue as https://issues.dlang.org/show_bug.cgi?id=24460

--


More information about the Digitalmars-d-bugs mailing list