Skip to content

Conversation

@ahejlsberg
Copy link
Member

Fixes #1975.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds a defensive type check to prevent incorrect parameter name matching when processing JSDoc parameter tags for functions with destructured parameters.

  • Adds an IsIdentifier check before accessing the parameter name's text representation
  • Prevents potential crashes or incorrect behavior when parameters use destructuring patterns like {x, y}

@jakebailey jakebailey added this pull request to the merge queue Oct 30, 2025
@jakebailey jakebailey removed this pull request from the merge queue due to a manual request Oct 30, 2025
@jakebailey
Copy link
Member

#1976 has a test. I don't really care which PR goes in, just need to get someone to review PRs...

@ahejlsberg
Copy link
Member Author

I don't know that a regression test adds a lot of value here, so I'll merge this PR.

@ahejlsberg ahejlsberg added this pull request to the merge queue Oct 30, 2025
Merged via the queue into main with commit d891e4f Oct 30, 2025
28 checks passed
@ahejlsberg ahejlsberg deleted the fix-1975 branch October 30, 2025 15:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

panic handling request textDocument/references Unhandled case in Node.Text: *ast.BindingPattern

3 participants