This commit is contained in:
Araq
2018-08-31 17:27:57 +02:00
parent 2c8361bd39
commit e09eeb02bf
2 changed files with 24 additions and 1 deletions

View File

@@ -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)