Recover from unclosed class << self
#5445
Labels
bug
Something isn't working
good first issue
Good for newcomers
parser
Bug or limitation in Sorbet's parser
Input
→ View on sorbet.run
Observed output
Expected behavior
Sorbet should produce a parse result, instead of an empty parse result.
This doesn't matter quite as much as other parse results, because adding this line will force us to take the slow path still, but at least error messages will get better (and if you didn't fix the syntax error fast enough, we might be able to start showing completion requests in the class body eventually).
Note that we already recover for most other forms of mismatched
end
. See the changes in #5383 for inspiration on how to fix this.The text was updated successfully, but these errors were encountered: