build: instantiate generics
This commit is contained in:
@@ -63,7 +63,7 @@ func Gen(pkgPath, inFile string, src any) string {
|
||||
pkg := types.NewPackage(pkgPath, name)
|
||||
imp := packages.NewImporter(fset)
|
||||
ssaPkg, _, err := ssautil.BuildPackage(
|
||||
&types.Config{Importer: imp}, fset, pkg, files, ssa.SanityCheckFunctions)
|
||||
&types.Config{Importer: imp}, fset, pkg, files, ssa.SanityCheckFunctions|ssa.InstantiateGenerics)
|
||||
check(err)
|
||||
|
||||
if Verbose {
|
||||
|
||||
@@ -68,7 +68,7 @@ func GenFrom(fileOrPkg string) string {
|
||||
initial, err := packages.LoadEx(nil, prog.TypeSizes, cfg, fileOrPkg)
|
||||
check(err)
|
||||
|
||||
_, pkgs := ssautil.AllPackages(initial, ssa.SanityCheckFunctions)
|
||||
_, pkgs := ssautil.AllPackages(initial, ssa.SanityCheckFunctions|ssa.InstantiateGenerics)
|
||||
|
||||
pkg := initial[0]
|
||||
ssaPkg := pkgs[0]
|
||||
|
||||
Reference in New Issue
Block a user