-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Closed
Labels
ToolsThis label describes issues relating to any tools in the x/tools repository.This label describes issues relating to any tools in the x/tools repository.goplsIssues related to the Go language server, gopls.Issues related to the Go language server, gopls.
Milestone
Description
What version of Go are you using (go version
)?
go version go1.20.6 darwin/amd64
golang.org/x/tools/gopls v0.12.4
golang.org/x/tools/gopls@(devel)
Does this issue reproduce with the latest release?
yes
What operating system and processor architecture are you using (go env
)?
darwin, amd64
What did you expect to see?
Refactor of code with anonymous struct completes successfully
What did you see instead?
parent nil
error while extracting code with anonymous struct
I was able to reproduce the issue in both Neovim and VSCode.
On the demo below, you can see a successful refactor of named struct and then fail on anonymous struct.
https://github.com/golang/go/assets/27726430/f3096917-4158-4bf1-be52-4477863fa454
tttoad
Metadata
Metadata
Assignees
Labels
ToolsThis label describes issues relating to any tools in the x/tools repository.This label describes issues relating to any tools in the x/tools repository.goplsIssues related to the Go language server, gopls.Issues related to the Go language server, gopls.