summary refs log tree commit diff stats
path: root/compiler/lookups.nim
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/lookups.nim')
-rw-r--r--compiler/lookups.nim2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/lookups.nim b/compiler/lookups.nim
index 18b47a7bb..8239f2a47 100644
--- a/compiler/lookups.nim
+++ b/compiler/lookups.nim
@@ -92,7 +92,7 @@ proc errorSym*(c: PContext, n: PNode): PSym =
   result.typ = errorType(c)
   incl(result.flags, sfDiscardable)
   # pretend it's imported from some unknown module to prevent cascading errors:
-  if gCmd != cmdInteractive:
+  if gCmd != cmdInteractive and c.inCompilesContext == 0:
     c.importTable.addSym(result)
 
 type