Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x/tools/gopls: references query on T in struct { p.T } returns references to p #60369

Closed
adonovan opened this issue May 23, 2023 · 2 comments
Closed
Assignees
Labels
gopls Issues related to the Go language server, gopls. Tools This label describes issues relating to any tools in the x/tools repository.
Milestone

Comments

@adonovan
Copy link
Member

With gopls@latest, a references query on the name of an embedded type in a struct field instead reports references to the package name.

type S struct {
    s fmt.Stringer
    fmt.Stringer // references on Stringer here returns references to fmt
}

References to all the other identifiers in the above example work correctly.

@gopherbot gopherbot added Tools This label describes issues relating to any tools in the x/tools repository. gopls Issues related to the Go language server, gopls. labels May 23, 2023
@gopherbot gopherbot added this to the Unreleased milestone May 23, 2023
@adonovan adonovan self-assigned this May 23, 2023
@adonovan
Copy link
Member Author

Root cause is #60372.

@gopherbot
Copy link

Change https://go.dev/cl/497495 mentions this issue: gopls/internal/lsp/source: fix references bug on struct{p.T}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
gopls Issues related to the Go language server, gopls. Tools This label describes issues relating to any tools in the x/tools repository.
Projects
None yet
Development

No branches or pull requests

3 participants