summary refs log tree commit diff stats
path: root/compiler/lookups.nim
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2013-12-24 14:04:18 +0100
committerAraq <rumpf_a@web.de>2013-12-24 14:04:18 +0100
commit83a0a3127667464b4aef73168747818926235514 (patch)
tree415ca81c8107204c233e6e9a052f2226c6756f3d /compiler/lookups.nim
parent4203e8955c83985fd633c2a8abd86a1549a6a736 (diff)
downloadNim-83a0a3127667464b4aef73168747818926235514.tar.gz
attempt to merge newtempl
Diffstat (limited to 'compiler/lookups.nim')
-rw-r--r--compiler/lookups.nim7
1 files changed, 5 insertions, 2 deletions
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: