diff options
author | Araq <rumpf_a@web.de> | 2012-07-19 00:55:58 +0200 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2012-07-19 00:55:58 +0200 |
commit | b9e7f30dda8a066e7a5e439b98d94fc729c1d9b5 (patch) | |
tree | 26b510546eff2bbd055cd6c2875e7ccc97dcac8c | |
parent | e54ce7ddc195d55bf027acf3e5abde9851ab00ca (diff) | |
download | Nim-b9e7f30dda8a066e7a5e439b98d94fc729c1d9b5.tar.gz |
made ttempl3 green again
-rwxr-xr-x | compiler/semtempl.nim | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/compiler/semtempl.nim b/compiler/semtempl.nim index 98c4aff53..960650a61 100755 --- a/compiler/semtempl.nim +++ b/compiler/semtempl.nim @@ -50,7 +50,7 @@ proc resolveTemplateParams(c: PContext, n: PNode, owner: PSym, toBind: var TIntSet): PNode = var s: PSym case n.kind - of nkIdent, nkAccQuoted: + of nkIdent: result = n let s = QualifiedLookUp(c, n, {}) if s != nil: @@ -59,6 +59,7 @@ proc resolveTemplateParams(c: PContext, n: PNode, owner: PSym, result.info = n.info elif Contains(toBind, s.id): result = symChoice(c, n, s) + of nkEmpty, nkSym..nkNilLit: # atom result = n of nkBind: @@ -68,7 +69,7 @@ proc resolveTemplateParams(c: PContext, n: PNode, owner: PSym, else: # dotExpr is ambiguous: note that we explicitely allow 'x.TemplateParam', # 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, {}) if s != nil and Contains(toBind, s.id): return symChoice(c, n, s) |