made ttempl3 green again
This commit is contained in:
parent
e54ce7ddc1
commit
b9e7f30dda
1 changed files with 3 additions and 2 deletions
|
|
@ -50,7 +50,7 @@ proc resolveTemplateParams(c: PContext, n: PNode, owner: PSym,
|
||||||
toBind: var TIntSet): PNode =
|
toBind: var TIntSet): PNode =
|
||||||
var s: PSym
|
var s: PSym
|
||||||
case n.kind
|
case n.kind
|
||||||
of nkIdent, nkAccQuoted:
|
of nkIdent:
|
||||||
result = n
|
result = n
|
||||||
let s = QualifiedLookUp(c, n, {})
|
let s = QualifiedLookUp(c, n, {})
|
||||||
if s != nil:
|
if s != nil:
|
||||||
|
|
@ -59,6 +59,7 @@ proc resolveTemplateParams(c: PContext, n: PNode, owner: PSym,
|
||||||
result.info = n.info
|
result.info = n.info
|
||||||
elif Contains(toBind, s.id):
|
elif Contains(toBind, s.id):
|
||||||
result = symChoice(c, n, s)
|
result = symChoice(c, n, s)
|
||||||
|
|
||||||
of nkEmpty, nkSym..nkNilLit: # atom
|
of nkEmpty, nkSym..nkNilLit: # atom
|
||||||
result = n
|
result = n
|
||||||
of nkBind:
|
of nkBind:
|
||||||
|
|
@ -68,7 +69,7 @@ proc resolveTemplateParams(c: PContext, n: PNode, owner: PSym,
|
||||||
else:
|
else:
|
||||||
# dotExpr is ambiguous: note that we explicitely allow 'x.TemplateParam',
|
# dotExpr is ambiguous: note that we explicitely allow 'x.TemplateParam',
|
||||||
# so we use the generic code for nkDotExpr too
|
# so we use the generic code for nkDotExpr too
|
||||||
if n.kind == nkDotExpr:
|
if n.kind == nkDotExpr or n.kind == nkAccQuoted:
|
||||||
let s = QualifiedLookUp(c, n, {})
|
let s = QualifiedLookUp(c, n, {})
|
||||||
if s != nil and Contains(toBind, s.id):
|
if s != nil and Contains(toBind, s.id):
|
||||||
return symChoice(c, n, s)
|
return symChoice(c, n, s)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue