diff options
Diffstat (limited to 'src/go/types/predicates.go')
-rw-r--r-- | src/go/types/predicates.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/go/types/predicates.go b/src/go/types/predicates.go index 83bc64772f..ba7901b3c3 100644 --- a/src/go/types/predicates.go +++ b/src/go/types/predicates.go @@ -140,6 +140,9 @@ func hasEmptyTypeset(t Type) bool { // TODO(gri) should we include signatures or assert that they are not present? func isGeneric(t Type) bool { // A parameterized type is only generic if it doesn't have an instantiation already. + if alias, _ := t.(*Alias); alias != nil && alias.tparams != nil && alias.targs == nil { + return true + } named := asNamed(t) return named != nil && named.obj != nil && named.inst == nil && named.TypeParams().Len() > 0 } |