From 83a0a3127667464b4aef73168747818926235514 Mon Sep 17 00:00:00 2001 From: Araq Date: Tue, 24 Dec 2013 14:04:18 +0100 Subject: attempt to merge newtempl --- compiler/lookups.nim | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'compiler/lookups.nim') diff --git a/compiler/lookups.nim b/compiler/lookups.nim index e1ec9e14b..642243468 100644 --- a/compiler/lookups.nim +++ b/compiler/lookups.nim @@ -233,8 +233,11 @@ proc QualifiedLookUp*(c: PContext, n: PNode, flags = {checkUndeclared}): PSym = if result == nil and checkUndeclared in flags: LocalError(n.sons[1].info, errUndeclaredIdentifier, ident.s) result = errorSym(c, n.sons[1]) - elif checkUndeclared in flags: - LocalError(n.sons[1].info, errIdentifierExpected, + elif n.sons[1].kind == nkSym: + result = n.sons[1].sym + elif checkUndeclared in flags and + n.sons[1].kind notin {nkOpenSymChoice, nkClosedSymChoice}: + LocalError(n.sons[1].info, errIdentifierExpected, renderTree(n.sons[1])) result = errorSym(c, n.sons[1]) else: -- cgit 1.4.1-2-gfad0