x/tools/gopls: unnecessary autocomplete of int() cast inside array index #44268
Labels
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?
I'm on the latest version of the Go VSCode extension (0.22.1) which from what I understand is now using gopls.
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
The automatic cast insertion in VSCode inserts unnecessary
int()
casts inside array index expressions:I keep having to delete these automatically inserted casts after autocompleting. While they don't alter the semantics of the code, they are visually noisy and I would prefer to not have them.
What did you expect to see?
I would expect autocomplete to not insert explicit casts wherever the language supports implicit casts.
What did you see instead?
It looks like the autocomplete feature of gopls always inserts explicit casts even when they are unnecessary.
The text was updated successfully, but these errors were encountered: