bugfix: gensym in rofiles
This commit is contained in:
parent
350e178d83
commit
a85b579718
1 changed files with 2 additions and 1 deletions
|
|
@ -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:
|
if n.kind notin nkLambdaKinds and symBinding(n.sons[pragmasPos]) == spGenSym:
|
||||||
let ident = getIdentNode(c, n.sons[namePos])
|
let ident = getIdentNode(c, n.sons[namePos])
|
||||||
if not isTemplParam(c, ident):
|
if not isTemplParam(c, ident):
|
||||||
let s = newGenSym(k, ident, c)
|
var s = newGenSym(k, ident, c)
|
||||||
|
s.ast = n
|
||||||
addPrelimDecl(c.c, s)
|
addPrelimDecl(c.c, s)
|
||||||
n.sons[namePos] = newSymNode(s, n.sons[namePos].info)
|
n.sons[namePos] = newSymNode(s, n.sons[namePos].info)
|
||||||
else:
|
else:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue