fmt: refers to the empty interface by the longer, older "interface {}" name instead of the shorter, newer "any" #65912
Labels
FeatureRequest
Issues asking for a new feature that does not need a proposal.
FrozenDueToAge
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
Go version
go version go1.22.0 darwin/arm64
Output of
go env
in your module/workspace:What did you do?
I used fmt's
%#v
to print a value whose type involves the empty interface in a module that declares Go version 1.22.0.https://go.dev/play/p/pByHBo9Vs03
What did you see happen?
What did you expect to see?
Go 1.18 added the predeclared type any as an alias for the empty interface.
It might be an enhancement if
fmt
were to take advantage of it, and print:CC @robpike, @martisch.
The text was updated successfully, but these errors were encountered: