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