/ go Public
x/tools/gopls: rename fails with "conflicts with var in same block" when the new identifier already exists #41852
Issues related to the Go language server, gopls.
Feedback is required from experts, contributors, and/or the community before a change can be made.
This label describes issues relating to any tools in the x/tools repository.
This is related to (but slightly different from) #41851.
What did you do?
Follow the same steps to reproduce as for #41851, but for step (1) use a declared identifier instead of an undeclared one.
What did you expect to see?
The identifier at the point, as well as all references to it, should be renamed, despite the fact that the new identifier conflicts with the existing declaration.
The resulting program should now have a
redeclared in this blockerror (https://play.golang.org/p/IP2ZkF7qnIe), which the user may resolve by removing one or the other of the conflicting declarations.
What did you see instead?
The text was updated successfully, but these errors were encountered: