From 4e980249e871cd7f64479b552da8eaa49d41376f Mon Sep 17 00:00:00 2001 From: ringabout <43030857+ringabout@users.noreply.github.com> Date: Sun, 11 Jan 2026 21:47:02 +0800 Subject: [PATCH] fixes --- compiler/cgen.nim | 2 ++ 1 file changed, 2 insertions(+) diff --git a/compiler/cgen.nim b/compiler/cgen.nim index 7298535a28..2c2ca772ad 100644 --- a/compiler/cgen.nim +++ b/compiler/cgen.nim @@ -1317,6 +1317,8 @@ proc genProcLvl3*(m: BModule, prc: PSym) = assert(prc.ast != nil) var procBody = transformBody(m.g.graph, m.idgen, prc, {}) + if sfInjectDestructors in prc.flags and not isIterator(prc): + procBody = injectDestructorCalls(m.g.graph, m.idgen, prc, procBody) let tmpInfo = prc.info discard freshLineInfo(p, prc.info)