summary refs log tree commit diff stats
path: root/compiler/transf.nim
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/transf.nim')
-rw-r--r--compiler/transf.nim2
1 files changed, 2 insertions, 0 deletions
diff --git a/compiler/transf.nim b/compiler/transf.nim
index ff790306b..dd8dd1519 100644
--- a/compiler/transf.nim
+++ b/compiler/transf.nim
@@ -735,6 +735,8 @@ proc transform(c: PTransf, n: PNode): PTransNode =
     var s = n.sons[namePos].sym
     if n.typ != nil and s.typ.callConv == ccClosure:
       result = transformSym(c, n.sons[namePos])
+      # use the same node as before if still a symbol:
+      if result.PNode.kind == nkSym: result = PTransNode(n)
     else:
       result = PTransNode(n)
   of nkMacroDef: