You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
x/tools: support for type-inferred composite literals #82039
[Update: only gopls' inline and extract operations still need addressing. -- adonovan, Oct 20]
Now that #12854 has been accepted for Go 1.28, we need to ensure that all of x/tools (incl. gopls) is able to handle non-nested ast.CompositeLit nodes that lack an explicit type.
The following packages mention ast.CompositeLit and are thus a likely upper bound for the audit:
Activity
gabyhelp commentedon Oct 6, 2026
Related Issues
(Emoji vote if this was helpful or unhelpful; more detailed feedback welcome in this discussion.)
adonovan commentedon Oct 7, 2026
work in progress:
https://go.dev/cl/801760
https://go.dev/cl/802121
https://go.dev/cl/846686
https://go.dev/cl/846687
https://go.dev/cl/846688
https://go.dev/cl/846689
https://go.dev/cl/846690
https://go.dev/cl/846691
https://go.dev/cl/846692
https://go.dev/cl/846693
gopherbot commentedon Oct 7, 2026
Change https://go.dev/cl/846693 mentions this issue:
gopls/internal/golang: undeclared: reject ill-typed argumentsgopherbot commentedon Oct 7, 2026
Change https://go.dev/cl/846688 mentions this issue:
internal/refactor/inline: handle untyped composite literalsgopherbot commentedon Oct 7, 2026
Change https://go.dev/cl/846687 mentions this issue:
go/analysis/passes/modernize: newexpr: reject untyped composite literalsgopherbot commentedon Oct 7, 2026
Change https://go.dev/cl/846691 mentions this issue:
refactor/eg: compare types of composite literals with implicit typesgopherbot commentedon Oct 7, 2026
gopherbot commentedon Oct 7, 2026
gopherbot commentedon Oct 7, 2026
Change https://go.dev/cl/846686 mentions this issue:
go/ssa: support pointer-typed composite literals in all contextsgopherbot commentedon Oct 7, 2026
Change https://go.dev/cl/846692 mentions this issue:
gopls/internal/analysis/ptrtoerror: handle pointer-typed composite literalsgo/ssa: support pointer-typed composite literals in all contexts
go/analysis/passes/modernize: newexpr: reject untyped composite literals
refactor/eg: compare types of composite literals with implicit types
gopls/internal/golang: undeclared: reject invalid type arguments
gopls/internal/analysis/ptrtoerror: handle pointer-typed composite li…
internal/refactor/inline: handle go1.28 inferred {...} literals
gopherbot commentedon Oct 14, 2026
Change https://go.dev/cl/848309 mentions this issue:
internal/refactor/inline: add failing tests for go1.28 inferred {...} literalsgopherbot commentedon Oct 14, 2026
Change https://go.dev/cl/848310 mentions this issue:
internal/refactor/inline: type inferred comp lit returns assigned to blank or interfacegopherbot commentedon Oct 14, 2026
Change https://go.dev/cl/848314 mentions this issue:
internal/refactor/inline: type inferred comp lit args discarded in empty funcgopherbot commentedon Oct 14, 2026
Change https://go.dev/cl/848312 mentions this issue:
internal/refactor/inline: type inferred comp lit returns discarded in stmt contextinternal/refactor/inline: explicit type for empty body func
internal/refactor/inline: explicit type for single return func