Skip to content

Commit

Permalink
cmd/compile/internal/importer, gcimporter: use *TypeParam as tparamIn…
Browse files Browse the repository at this point in the history
…dex map value

This is a map from identifiers to type parameters, use *TypeParam
as map value instead of Type.

Change-Id: Ib006393418c6352bcffc1c6796c5e002c33d9f4e
Reviewed-on: https://go-review.googlesource.com/c/go/+/379634
Trust: Robert Griesemer <gri@golang.org>
Run-TryBot: Robert Griesemer <gri@golang.org>
Trust: Dan Scales <danscales@google.com>
Reviewed-by: Dan Scales <danscales@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
  • Loading branch information
griesemer committed Jan 20, 2022
1 parent e4ab8b0 commit e7d5857
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/cmd/compile/internal/importer/iimport.go
Expand Up @@ -126,7 +126,7 @@ func ImportData(imports map[string]*types2.Package, data, path string) (pkg *typ
typCache: make(map[uint64]types2.Type),
// Separate map for typeparams, keyed by their package and unique
// name (name with subscript).
tparamIndex: make(map[ident]types2.Type),
tparamIndex: make(map[ident]*types2.TypeParam),
}

for i, pt := range predeclared {
Expand Down Expand Up @@ -202,7 +202,7 @@ type iimporter struct {
declData string
pkgIndex map[*types2.Package]map[string]uint64
typCache map[uint64]types2.Type
tparamIndex map[ident]types2.Type
tparamIndex map[ident]*types2.TypeParam

interfaceList []*types2.Interface
}
Expand Down
4 changes: 2 additions & 2 deletions src/go/internal/gcimporter/iimport.go
Expand Up @@ -127,7 +127,7 @@ func iImportData(fset *token.FileSet, imports map[string]*types.Package, dataRea
typCache: make(map[uint64]types.Type),
// Separate map for typeparams, keyed by their package and unique
// name (name with subscript).
tparamIndex: make(map[ident]types.Type),
tparamIndex: make(map[ident]*types.TypeParam),

fake: fakeFileSet{
fset: fset,
Expand Down Expand Up @@ -207,7 +207,7 @@ type iimporter struct {
declData []byte
pkgIndex map[*types.Package]map[string]uint64
typCache map[uint64]types.Type
tparamIndex map[ident]types.Type
tparamIndex map[ident]*types.TypeParam

fake fakeFileSet
interfaceList []*types.Interface
Expand Down

0 comments on commit e7d5857

Please sign in to comment.