Bug 10247 – LastCatch grammar does not match implementation

Status
NEW
Severity
normal
Priority
P3
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-06-02T16:03:33Z
Last change time
2024-12-13T18:07:27Z
Keywords
spec
Assigned to
No Owner
Creator
briancschott
Depends on
12558
Blocks
10233
Moved to GitHub: dmd#18595 →

Comments

Comment #0 by briancschott — 2013-06-02T16:03:33Z
Consider the following code: try { functionCall(); } catch (a + b).c(); This should match the LastCatch rule because (a + b).c() falls under the category of NoScopeNonEmptyStatement, but dmd's parser only checks the opening paren after the 'catch' token and tries going for the Catch rule.
Comment #1 by briancschott — 2014-06-06T20:05:00Z
I've tried to fix this in D-Scanner, and so far I haven't figured out a way to eliminate the ambiguity. I support implementing issue 12558 and removing the LastCatch rule from the language entirely.
Comment #2 by robert.schadek — 2024-12-13T18:07:27Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/18595 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB