-
Notifications
You must be signed in to change notification settings - Fork 734
Fix panic in inlay hints for tuple types #2040
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
+71
−0
Conversation
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
Co-authored-by: jakebailey <5341706+jakebailey@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix crash in VSCode for unhandled case in Node.ElementList
Fix panic in inlay hints for tuple types
Nov 8, 2025
Copilot finished work on behalf of
jakebailey
November 8, 2025 03:59
jakebailey
reviewed
Nov 8, 2025
Co-authored-by: jakebailey <5341706+jakebailey@users.noreply.github.com>
jakebailey
approved these changes
Nov 10, 2025
Contributor
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.
Copilot finished reviewing on behalf of
jakebailey
November 10, 2025 21:52
gabritto
approved these changes
Nov 12, 2025
Member
|
#2052 fixed this bug, so now this PR only contains the test which I'd like to still have. |
gabritto
approved these changes
Nov 12, 2025
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.
Fixes #2039
Fix crash in VSCode:
Unhandled case in Node.ElementList: KindTupleTypeSummary
Fixed a crash that occurred when using TypeScript inlay hints with tuple types. The crash happened when the language server tried to display type information for parameters with tuple types like
[string][].Plan
ElementList()method doesn't handleKindTupleTypeKindTupleTypecase toElementList()method ininternal/ast/ast.goChanges Made
ElementList()ininternal/ast/ast.go: Added handling forKindTupleTypeby returning the Elements field from TupleTypeNodeTestInlayHintsTupleTypeCrash: Reproduces the original issue with tuple types in inlay hints (now ininternal/fourslash/tests/)Testing & Validation
✅ Test passes in new location
✅ All existing tests pass
✅ Linting passes - 0 issues
✅ Formatting check passes
✅ CodeQL security check - no issues found
Original prompt
This section details on the original issue you should resolve
<issue_title>Crash in VSCode:
Unhandled case in Node.ElementList: KindTupleType</issue_title><issue_description>## Stack trace