cl: SetPatch fix

This commit is contained in:
xushiwei
2024-07-01 19:05:12 +08:00
parent 8c45eb7524
commit 04416a67d3
2 changed files with 8 additions and 1 deletions

7
_demo/fmtdemo/fmt.go Normal file
View File

@@ -0,0 +1,7 @@
package main
import "fmt"
func main() {
fmt.Println("Hello, world")
}

View File

@@ -786,11 +786,11 @@ func NewPackageEx(prog llssa.Program, patches Patches, pkg *ssa.Package, files [
}
ctx.initPyModule()
ctx.initFiles(pkgPath, files)
ret.SetPatch(ctx.patchType)
if hasPatch {
skips := ctx.skips
typepatch.Merge(pkgTypes, oldTypes, skips, ctx.skipall)
ret.SetPatch(ctx.patchType)
ctx.skips = nil
ctx.state = pkgInPatch
if _, ok := skips["init"]; ok || ctx.skipall {