Go: Don't extract objects for type aliases

This commit is contained in:
Michael B. Gale
2024-09-03 15:20:08 +01:00
parent 97c3efccd1
commit 1a9608a1f5

View File

@@ -1516,7 +1516,7 @@ func isAlias(tp types.Type) bool {
// If the given type is a type alias, this function resolves it to its underlying type.
func resolveTypeAlias(tp types.Type) types.Type {
if isAlias(tp) {
return tp.Underlying()
return types.Unalias(tp) // tp.Underlying()
}
return tp
}