summary refs log tree commit diff stats
path: root/compiler
diff options
context:
space:
mode:
Diffstat (limited to 'compiler')
-rw-r--r--compiler/lookups.nim2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/lookups.nim b/compiler/lookups.nim
index 93a7b7c72..fcb5b6731 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