diff --git a/_demo/fmtdemo/fmt.go b/_demo/fmtdemo/fmt.go new file mode 100644 index 00000000..8117330d --- /dev/null +++ b/_demo/fmtdemo/fmt.go @@ -0,0 +1,7 @@ +package main + +import "fmt" + +func main() { + fmt.Println("Hello, world") +} diff --git a/cl/compile.go b/cl/compile.go index b5a299c6..188b274f 100644 --- a/cl/compile.go +++ b/cl/compile.go @@ -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 {