diff options
Diffstat (limited to 'src/cmd/compile/internal/importer/iimport.go')
-rw-r--r-- | src/cmd/compile/internal/importer/iimport.go | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/cmd/compile/internal/importer/iimport.go b/src/cmd/compile/internal/importer/iimport.go index 4384e59c30..a46971d0a7 100644 --- a/src/cmd/compile/internal/importer/iimport.go +++ b/src/cmd/compile/internal/importer/iimport.go @@ -309,7 +309,7 @@ func (r *importReader) obj(name string) { r.declare(types2.NewConst(pos, r.currPkg, name, typ, val)) case 'F', 'G': - var tparams []*types2.TypeName + var tparams []*types2.TypeParam if tag == 'G' { tparams = r.tparamList() } @@ -318,7 +318,7 @@ func (r *importReader) obj(name string) { r.declare(types2.NewFunc(pos, r.currPkg, name, sig)) case 'T', 'U': - var tparams []*types2.TypeName + var tparams []*types2.TypeParam if tag == 'U' { tparams = r.tparamList() } @@ -347,9 +347,9 @@ func (r *importReader) obj(name string) { // typeparams being used in the method sig/body). targs := baseType(msig.Recv().Type()).TArgs() if len(targs) > 0 { - rparams := make([]*types2.TypeName, len(targs)) + rparams := make([]*types2.TypeParam, len(targs)) for i, targ := range targs { - rparams[i] = types2.AsTypeParam(targ).Obj() + rparams[i] = types2.AsTypeParam(targ) } msig.SetRParams(rparams) } @@ -690,15 +690,15 @@ func (r *importReader) signature(recv *types2.Var) *types2.Signature { return types2.NewSignature(recv, params, results, variadic) } -func (r *importReader) tparamList() []*types2.TypeName { +func (r *importReader) tparamList() []*types2.TypeParam { n := r.uint64() if n == 0 { return nil } - xs := make([]*types2.TypeName, n) + xs := make([]*types2.TypeParam, n) for i := range xs { typ := r.typ() - xs[i] = types2.AsTypeParam(typ).Obj() + xs[i] = types2.AsTypeParam(typ) } return xs } |