Update tree-sitter-kotlin to fix spurious semicolon insertion#781
Merged
Update tree-sitter-kotlin to fix spurious semicolon insertion#781
Conversation
Bumps the pinned tree-sitter-kotlin rev to ff4faf1d4e76a579df0d55410e22bc5512a6e731
(danieltrt/tree-sitter-kotlin, use-0.3.5 branch) which fixes three bugs
in the external scanner:
1. Same-line `case 'e'` inserted semicolons before any identifier starting
with 'e' that wasn't 'else' (e.g. eventStream, error, element). This
caused `return eventStream.error().filter{...}` to parse as bare
`return` + separate call_expression, leading AutoClean to incorrectly
remove the return argument as dead code (D22753743).
2. `scan_for_word` lacked word-boundary checking, so `import` matched
`importantValue` and similar prefixes.
3. `pop()` used post-decrement, reading one element past valid stack data.
danieltrt
approved these changes
Apr 1, 2026
Contributor
Author
|
CLA Bot is bugged. Can't see any license to accept. I agree to whatever's there in that license. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bumps the pinned tree-sitter-kotlin rev to ff4faf1d4e76a579df0d55410e22bc5512a6e731 (danieltrt/tree-sitter-kotlin, use-0.3.5 branch) which fixes three bugs in the external scanner:
Same-line
case 'e'inserted semicolons before any identifier starting with 'e' that wasn't 'else' (e.g. eventStream, error, element). This causedreturn eventStream.error().filter{...}to parse as barereturn+ separate call_expression, leading AutoClean to incorrectly remove the return argument as dead code (D22753743).scan_for_wordlacked word-boundary checking, soimportmatchedimportantValueand similar prefixes.pop()used post-decrement, reading one element past valid stack data.