patch: Clone/Merge

This commit is contained in:
xushiwei
2024-06-28 15:14:30 +08:00
parent 2165941026
commit fe18c35dab
6 changed files with 78 additions and 70 deletions

View File

@@ -227,7 +227,7 @@ func TestErrImport(t *testing.T) {
alt.Scope().Insert(
types.NewConst(0, alt, "LLGoPackage", types.Typ[types.String], constant.MakeString("noinit")),
)
ctx.patches = Patches{"foo": &ssa.Package{Pkg: alt}}
ctx.patches = Patches{"foo": Patch{Alt: &ssa.Package{Pkg: alt}, Types: alt}}
ctx.importPkg(pkg, &pkgInfo{})
}