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.nim5
1 files changed, 4 insertions, 1 deletions
diff --git a/compiler/transf.nim b/compiler/transf.nim
index 13c6dd8fe..cbd1f15e3 100644
--- a/compiler/transf.nim
+++ b/compiler/transf.nim
@@ -869,7 +869,10 @@ proc transform(c: PTransf, n: PNode): PTransNode =
     else:
       result = transformSons(c, n)
   of nkIdentDefs, nkConstDef:
-    result = transformSons(c, n)
+    result = n.PTransNode
+    #transformSons(c, n)
+    let L = n.len-1
+    result[L] = transform(c, n.sons[L])
     # XXX comment handling really sucks:
     if importantComments():
       PNode(result).comment = n.comment