diff options
Diffstat (limited to 'src/cmd/compile/internal/importer/iimport.go')
-rw-r--r-- | src/cmd/compile/internal/importer/iimport.go | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/cmd/compile/internal/importer/iimport.go b/src/cmd/compile/internal/importer/iimport.go index 3aab32fc6b..6dd8d595ae 100644 --- a/src/cmd/compile/internal/importer/iimport.go +++ b/src/cmd/compile/internal/importer/iimport.go @@ -676,12 +676,9 @@ func (r *importReader) doType(base *types2.Named) types2.Type { if r.p.exportVersion < iexportVersionGenerics { errorf("unexpected instantiation type") } - nt := int(r.uint64()) - terms := make([]*types2.Term, nt) + terms := make([]*types2.Term, r.uint64()) for i := range terms { - typ := r.typ() - tilde := r.bool() - terms[i] = types2.NewTerm(tilde, typ) + terms[i] = types2.NewTerm(r.bool(), r.typ()) } return types2.NewUnion(terms) } |