x/tools/gopls: DocumentHighlight incorrectly highlights outer scope #39275
Labels
Documentation
Issues describing a change to documentation.
FrozenDueToAge
gopls
Issues related to the Go language server, gopls.
Tools
This label describes issues relating to any tools in the x/tools repository.
Milestone
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
When calling
textDocument/documentHighlight
with the cursor onbreak
in the code above, it incorrectly returns the outer for-loop:What did you expect to see?
I expect the
switch
statement to be highlighted instead offor
.The text was updated successfully, but these errors were encountered: