diff options
Diffstat (limited to 'src/cmd/compile/internal/types/type.go')
-rw-r--r-- | src/cmd/compile/internal/types/type.go | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/cmd/compile/internal/types/type.go b/src/cmd/compile/internal/types/type.go index 8d07b88ecd..987aa11454 100644 --- a/src/cmd/compile/internal/types/type.go +++ b/src/cmd/compile/internal/types/type.go @@ -1657,6 +1657,7 @@ func NewInterface(pkg *Pkg, methods []*Field) *Type { // not really be needed except for the type checker). func NewTypeParam(pkg *Pkg, constraint *Type) *Type { t := New(TTYPEPARAM) + constraint.wantEtype(TINTER) t.methods = constraint.methods t.Extra.(*Interface).pkg = pkg return t |