From a1cf228493c9f8aa82a89ea7c5c34d7fa213ca97 Mon Sep 17 00:00:00 2001 From: ringabout <43030857+ringabout@users.noreply.github.com> Date: Tue, 19 May 2026 20:36:05 +0800 Subject: [PATCH] address comments --- compiler/transf.nim | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/compiler/transf.nim b/compiler/transf.nim index a320fe3807..0775c92f69 100644 --- a/compiler/transf.nim +++ b/compiler/transf.nim @@ -96,7 +96,8 @@ proc freshOwnedSym(c: PTransf; s, owner: PSym): PNode = # This can happen for example for iterators which are transformed multiple times when # they are used in different contexts. var fresh = copySym(s, c.idgen) - incl(fresh.flagsImpl, sfFromGeneric) + if fresh.kind notin routineKinds: + incl(fresh.flagsImpl, sfFromGeneric) setOwner(fresh, owner) result = newSymNode(fresh) @@ -218,7 +219,7 @@ proc copyRoutineTypeHeader(c: PTransf; oldProc, newProc: PSym) = newProc.typ = copyType(oldProc.typ, c.idgen, newProc) newProc.typ.n = newNodeI(oldProc.typ.n.kind, oldProc.typ.n.info) if oldProc.typ.n.len > 0: - newProc.typ.n.add copyNode(oldProc.typ.n[0]) + newProc.typ.n.add copyTree(oldProc.typ.n[0]) for i in 1..