x/tools/gopls: Rename Symbol incorrectly renames symbols when code contains a syntax error #68465
Labels
gopls/parsing
Issues related to parsing / poor parser recovery.
gopls
Issues related to the Go language server, gopls.
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Tools
This label describes issues relating to any tools in the x/tools repository.
Milestone
Go version
go version go1.22.5 linux/amd64 & golang.org/x/tools/gopls v0.16.1
Output of
go env
in your module/workspace:What did you do?
Using Rename Symbol on the first
attrs
to rename tofhAttrs
in the function below, results in the other usage of the symbol to be changed toafhAttrs0]
What did you see happen?
What did you expect to see?
Either fail to rename the symbol due to the syntax error, or work as expected.
The text was updated successfully, but these errors were encountered: