mirror of https://github.com/golang/go.git
go/loader: Initialize (types/Info).Instances field
Initialize the Instances field of PackageInfo.Info during importing. Needed for go/ssa and similar users. Updates golang/go#48525 Change-Id: Ibacf925e677ec6e90068b90a4f381d96c22338cc Reviewed-on: https://go-review.googlesource.com/c/tools/+/385774 Run-TryBot: Tim King <taking@google.com> gopls-CI: kokoro <noreply+kokoro@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Robert Findley <rfindley@google.com> Reviewed-by: Michael Matloob <matloob@golang.org>
This commit is contained in:
parent
be40034de7
commit
33002eafb2
|
|
@ -23,6 +23,7 @@ import (
|
|||
|
||||
"golang.org/x/tools/go/ast/astutil"
|
||||
"golang.org/x/tools/go/internal/cgo"
|
||||
"golang.org/x/tools/internal/typeparams"
|
||||
)
|
||||
|
||||
var ignoreVendor build.ImportMode
|
||||
|
|
@ -1053,6 +1054,7 @@ func (imp *importer) newPackageInfo(path, dir string) *PackageInfo {
|
|||
errorFunc: imp.conf.TypeChecker.Error,
|
||||
dir: dir,
|
||||
}
|
||||
typeparams.InitInstanceInfo(&info.Info)
|
||||
|
||||
// Copy the types.Config so we can vary it across PackageInfos.
|
||||
tc := imp.conf.TypeChecker
|
||||
|
|
|
|||
Loading…
Reference in New Issue