Closed frankeld closed 3 years ago
Just curious are there any tests we can add that would have failed with the old grammar but now should pass. Perhaps something like try, catch, catch, finally
or try, finally
?
@Nicholas-Lin Not really. The new grammar is strictly more strict, so anything in the new one will pass in the old one. However, I did add a test for multi-clause stuff because it wasn't actually covered.
Summary
Previously, this rule incorrectly captured more than is allowed. Normally, this isn't a big issue. However, this causes problems downstream because we cannot directly interpret if clauses are
catch
orfinally
, and the old version falsely makes it seem like we can have a series ofcatch
andfinally
clauses.This version allows:
finally
at the endfinally
, unless there is nofinally
. Then, 1 or morecatch
.~⚠️ Merge blocked until verification of impact downstream~ No downstream issues
Requirements (place an
x
in each[ ]
)