Skip to content

x/tools: support for embedded fields in struct literals #78553

@adonovan

Description

@adonovan

#9859 added language and compiler support for T{f: ...} where T is a struct type and f is an embedded field. This issue tracks the work of auditing x/tools and ensuring that it too supports this feature.

Gopls

If you find more cases to consider, please report as comments so we can track.

These are the only other places I found in my audit of x/tools (adonovan):

  • go/analysis/passes/composite analyzer (https://go.dev/cl/773222)
  • gopls compositeLiteralFields inlay hints should reveal the implicit selectors T{k: v} => T{a.b.k: v} (https://go.dev/cl/782060)
  • internal/refactor/inliner analyzeAssignment contains 2 suspect uses of KeyValueExpr (audited, both benign --adonovan)

Modernizer

Other Tools (to be notified)

Metadata

Metadata

Labels

FeatureRequestIssues asking for a new feature that does not need a proposal.NeedsFixThe path to resolution is known, but the work has not been done.ToolsThis label describes issues relating to any tools in the x/tools repository.

Type

No type
No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions