mirror of https://github.com/golang/go.git
go/ssa/ssautil: Initialize Instances field.
Initializes the Instances field during BuildPackage. Updates golang/go#48525 Change-Id: I4d60d644443733930528e2109db75589511de6f4 Reviewed-on: https://go-review.googlesource.com/c/tools/+/385775 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> Trust: Tim King <taking@google.com>
This commit is contained in:
parent
33002eafb2
commit
11109f6142
|
|
@ -14,6 +14,7 @@ import (
|
|||
"golang.org/x/tools/go/loader"
|
||||
"golang.org/x/tools/go/packages"
|
||||
"golang.org/x/tools/go/ssa"
|
||||
"golang.org/x/tools/internal/typeparams"
|
||||
)
|
||||
|
||||
// Packages creates an SSA program for a set of packages.
|
||||
|
|
@ -147,6 +148,7 @@ func BuildPackage(tc *types.Config, fset *token.FileSet, pkg *types.Package, fil
|
|||
Scopes: make(map[ast.Node]*types.Scope),
|
||||
Selections: make(map[*ast.SelectorExpr]*types.Selection),
|
||||
}
|
||||
typeparams.InitInstanceInfo(info)
|
||||
if err := types.NewChecker(tc, fset, pkg, info).Files(files); err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue