Skip to content

x/tools/gopls: 'references' on embedded field returns refs only to field, not type #63521

@adonovan

Description

@adonovan

The form struct {T} is unique in the Go grammar in that the identifier T is both a reference (to a type) and a declaration (of a field). When gopls responds to a references query on the identifier, it chooses arbitrarily to the interpret it as a field, and does not report references to the type. I think it should report the union of both.

Metadata

Metadata

Assignees

No one assigned

    Labels

    ToolsThis label describes issues relating to any tools in the x/tools repository.goplsIssues related to the Go language server, gopls.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions