summary refs log tree commit diff stats
path: root/compiler
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2012-10-05 14:33:32 +0200
committerAraq <rumpf_a@web.de>2012-10-05 14:33:32 +0200
commita85b5797184065f1b007fad93b2d27c91f2632e9 (patch)
tree08bdefd4e2667be6621fd8fe1ddc1db1d5bc7e47 /compiler
parent350e178d837a212755b729bb82225193acef5734 (diff)
downloadNim-a85b5797184065f1b007fad93b2d27c91f2632e9.tar.gz
bugfix: gensym in rofiles
Diffstat (limited to 'compiler')
-rwxr-xr-xcompiler/semtempl.nim3
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/semtempl.nim b/compiler/semtempl.nim
index 1444255ff..de103310b 100755
--- a/compiler/semtempl.nim
+++ b/compiler/semtempl.nim
@@ -181,7 +181,8 @@ proc semRoutineInTemplBody(c: var TemplCtx, n: PNode, k: TSymKind): PNode =
   if n.kind notin nkLambdaKinds and symBinding(n.sons[pragmasPos]) == spGenSym:
     let ident = getIdentNode(c, n.sons[namePos])
     if not isTemplParam(c, ident):
-      let s = newGenSym(k, ident, c)
+      var s = newGenSym(k, ident, c)
+      s.ast = n
       addPrelimDecl(c.c, s)
       n.sons[namePos] = newSymNode(s, n.sons[namePos].info)
     else: