Skip to content

Commit 11109f6

Browse files
committed
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 <[email protected]> gopls-CI: kokoro <[email protected]> TryBot-Result: Gopher Robot <[email protected]> Reviewed-by: Robert Findley <[email protected]> Trust: Tim King <[email protected]>
1 parent 33002ea commit 11109f6

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

go/ssa/ssautil/load.go

+2
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import (
1414
"golang.org/x/tools/go/loader"
1515
"golang.org/x/tools/go/packages"
1616
"golang.org/x/tools/go/ssa"
17+
"golang.org/x/tools/internal/typeparams"
1718
)
1819

1920
// 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
147148
Scopes: make(map[ast.Node]*types.Scope),
148149
Selections: make(map[*ast.SelectorExpr]*types.Selection),
149150
}
151+
typeparams.InitInstanceInfo(info)
150152
if err := types.NewChecker(tc, fset, pkg, info).Files(files); err != nil {
151153
return nil, nil, err
152154
}

0 commit comments

Comments
 (0)