From a85b5797184065f1b007fad93b2d27c91f2632e9 Mon Sep 17 00:00:00 2001 From: Araq Date: Fri, 5 Oct 2012 14:33:32 +0200 Subject: [PATCH] bugfix: gensym in rofiles --- compiler/semtempl.nim | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/compiler/semtempl.nim b/compiler/semtempl.nim index 1444255ff4..de103310b6 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: