Open
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