diff options
Diffstat (limited to 'src/cmd/compile/internal/types2/instantiate.go')
-rw-r--r-- | src/cmd/compile/internal/types2/instantiate.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/cmd/compile/internal/types2/instantiate.go b/src/cmd/compile/internal/types2/instantiate.go index 9d60021667..06cbcda58e 100644 --- a/src/cmd/compile/internal/types2/instantiate.go +++ b/src/cmd/compile/internal/types2/instantiate.go @@ -54,7 +54,7 @@ func Instantiate(env *Environment, typ Type, targs []Type, validate bool) (Type, var err error if validate { - var tparams []*TypeName + var tparams []*TypeParam switch t := typ.(type) { case *Named: tparams = t.TParams().list() @@ -96,7 +96,7 @@ func (check *Checker) instantiate(pos syntax.Pos, typ Type, targs []Type, posLis check.later(func() { // Collect tparams again because lazily loaded *Named types may not have // had tparams set up above. - var tparams []*TypeName + var tparams []*TypeParam switch t := typ.(type) { case *Named: tparams = t.TParams().list() @@ -192,11 +192,11 @@ func (check *Checker) validateTArgLen(pos syntax.Pos, tparams *TParamList, targs return true } -func (check *Checker) verify(pos syntax.Pos, tparams []*TypeName, targs []Type) (int, error) { +func (check *Checker) verify(pos syntax.Pos, tparams []*TypeParam, targs []Type) (int, error) { smap := makeSubstMap(tparams, targs) - for i, tname := range tparams { + for i, tpar := range tparams { // stop checking bounds after the first failure - if err := check.satisfies(pos, targs[i], tname.typ.(*TypeParam), smap); err != nil { + if err := check.satisfies(pos, targs[i], tpar, smap); err != nil { return i, err } } |