Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Go 1.22 Added types.Unalias per https://tip.golang.org/doc/go1.22
However, when #3226 and then #3246 was added, we added a variety of Go 1.23-only build-tagged code that we were supposed to remove when we dropped support for Go 1.22. However, types.Unalias should never have been Go 1.23 only. Go 1.23 Added generic type aliases which is a different thing than Go 1.9's type aliases.
In Go 1.9+ you can have a type alias:
but Go in 1.23 we can also declare type parameters with the alias declaration:
Importantly, Go 1.18 introduced
any
as a type alias forinterface{}
, and we want to encourage the use ofany
. Sinceany
is a type alias ofinterface{}
it is causing some confusion (and non-repeatable results) when we do not usetypes.Unalias
in Go 1.22.From Alias names