aboutsummaryrefslogtreecommitdiff
path: root/src/go/types/type.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/go/types/type.go')
-rw-r--r--src/go/types/type.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/go/types/type.go b/src/go/types/type.go
index 2660ce4408..20c4bec0bc 100644
--- a/src/go/types/type.go
+++ b/src/go/types/type.go
@@ -759,6 +759,9 @@ func (check *Checker) newTypeParam(obj *TypeName, index int, bound Type) *_TypeP
func (t *_TypeParam) Bound() *Interface {
iface := asInterface(t.bound)
+ if iface == nil {
+ return &emptyInterface
+ }
// use the type bound position if we have one
pos := token.NoPos
if n, _ := t.bound.(*Named); n != nil {