No graceful recovery from misplaced private
modifier in local scope
#22631
Labels
area:parser
better-errors
Issues concerned with improving confusing/unhelpful diagnostic messages
itype:bug
Spree
Suitable for a future Spree
Compiler version
3.6.3
Minimized code
Output
followed by dozens of diagnostics.
Showing that it blows past the end of the enclosing method at 400, then the next end marker for the class; then errors cascade from outside the local scope.
Expectation
Skipping a misplaced modifier seems like an easy recovery strategy.
Skipping just the (correctly indented) bad local def would help.
Correctly stopping at the (correctly aligned) end marker of the enclosing def would help.
The text was updated successfully, but these errors were encountered: