diff options
Diffstat (limited to 'src/cmd/compile/internal/importer/iimport.go')
-rw-r--r-- | src/cmd/compile/internal/importer/iimport.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/cmd/compile/internal/importer/iimport.go b/src/cmd/compile/internal/importer/iimport.go index a46971d0a7..c303126ea6 100644 --- a/src/cmd/compile/internal/importer/iimport.go +++ b/src/cmd/compile/internal/importer/iimport.go @@ -346,10 +346,10 @@ func (r *importReader) obj(name string) { // rparams of the method (since those are the // typeparams being used in the method sig/body). targs := baseType(msig.Recv().Type()).TArgs() - if len(targs) > 0 { - rparams := make([]*types2.TypeParam, len(targs)) - for i, targ := range targs { - rparams[i] = types2.AsTypeParam(targ) + if targs.Len() > 0 { + rparams := make([]*types2.TypeParam, targs.Len()) + for i := range rparams { + rparams[i] = types2.AsTypeParam(targs.At(i)) } msig.SetRParams(rparams) } |