[Issue 22191] New: -betterC: Overeager try/catch prohibition
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Aug 7 17:36:39 UTC 2021
https://issues.dlang.org/show_bug.cgi?id=22191
Issue ID: 22191
Summary: -betterC: Overeager try/catch prohibition
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: kinke at gmx.net
```
void foo() nothrow {}
void main()
{
try { foo(); }
catch (Exception) {}
}
```
The frontend removes the try/catch from the AST at some point, so this should
compile with -betterC too but doesn't ('Error: Cannot use try-catch statements
with -betterC').
--
More information about the Digitalmars-d-bugs
mailing list