summary refs log tree commit diff stats
path: root/compiler/semtempl.nim
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2018-08-31 17:27:57 +0200
committerAraq <rumpf_a@web.de>2018-08-31 17:27:57 +0200
commite09eeb02bf92b4bdcfb7a821014bedf71c753a95 (patch)
tree5f585ed571c63e4fdf5f0bd54d1a7855ed188c3f /compiler/semtempl.nim
parent2c8361bd39f98c869df7b23ee682c25a9929f64f (diff)
downloadNim-e09eeb02bf92b4bdcfb7a821014bedf71c753a95.tar.gz
fixes #8052
Diffstat (limited to 'compiler/semtempl.nim')
-rw-r--r--compiler/semtempl.nim2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/semtempl.nim b/compiler/semtempl.nim
index 2952831e9..396696422 100644
--- a/compiler/semtempl.nim
+++ b/compiler/semtempl.nim
@@ -210,7 +210,7 @@ proc addLocalDecl(c: var TemplCtx, n: var PNode, k: TSymKind) =
       if s != nil and s.owner == c.owner and sfGenSym in s.flags:
         styleCheckUse(n.info, s)
         replaceIdentBySym(c.c, n, newSymNode(s, n.info))
-      else:
+      elif not (n.kind == nkSym and sfGenSym in n.sym.flags):
         let local = newGenSym(k, ident, c)
         addPrelimDecl(c.c, local)
         styleCheckDef(c.c.config, n.info, local)