summary refs log tree commit diff stats
path: root/compiler/semexprs.nim
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2016-08-04 19:36:13 +0200
committerAndreas Rumpf <rumpf_a@web.de>2016-08-04 19:36:13 +0200
commit5d5636138377b63c4b7357ff40048b65a8dcd054 (patch)
tree1fdbe8a08ebac16fe3b21316a5681945a0a283d8 /compiler/semexprs.nim
parent4a96a3d9a1011c7023a45bb9f921a339aea0e3f7 (diff)
downloadNim-5d5636138377b63c4b7357ff40048b65a8dcd054.tar.gz
fixes #4353
Diffstat (limited to 'compiler/semexprs.nim')
-rw-r--r--compiler/semexprs.nim4
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler/semexprs.nim b/compiler/semexprs.nim
index fd18dc3d7..fc31829ba 100644
--- a/compiler/semexprs.nim
+++ b/compiler/semexprs.nim
@@ -2216,7 +2216,9 @@ proc semExpr(c: PContext, n: PNode, flags: TExprFlags = {}): PNode =
   if nfSem in n.flags: return
   case n.kind
   of nkIdent, nkAccQuoted:
-    var s = lookUp(c, n)
+    let checks = if efNoEvaluateGeneric in flags: {checkUndeclared}
+                 else: {checkUndeclared, checkModule, checkAmbiguity}
+    var s = qualifiedLookUp(c, n, checks)
     if c.inTypeClass == 0: semCaptureSym(s, c.p.owner)
     result = semSym(c, n, s, flags)
     if s.kind in {skProc, skMethod, skConverter, skIterator}: