diff --git a/App/lib/core/Gen/Func/FuncGenDef.vp b/App/lib/core/Gen/Func/FuncGenDef.vp index 3fe8d4b..f6bcfa2 100644 --- a/App/lib/core/Gen/Func/FuncGenDef.vp +++ b/App/lib/core/Gen/Func/FuncGenDef.vp @@ -760,7 +760,8 @@ novirtual class FuncGenDef(CallGenBase.CallGenBase): GenApi.clear_scope_names(trans) # Reset the in-chain nonlocal heap prebuild flag (built once per function; multiple nested function definitions # share one heap, preventing repeated malloc + double VarEntry redirection). - trans._nl_chain_done = 0 + trans._nl_chain_done = 0 + VLogger.info("TR.p1c.state.saved", "TR") # Pre-scan the body: 1) Global/Nonlocal declarations first (Python semantics: they apply to the whole function # scope regardless of position, so register before any assignment); 2) AnnAssign to create local allocas early.