bugfix: unreported 'compiles' bug

This commit is contained in:
Araq
2014-03-05 08:47:27 +01:00
parent 4f946cb44e
commit 3dfb4891c7
2 changed files with 3 additions and 1 deletions

View File

@@ -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

View File

@@ -24,3 +24,5 @@ ok supports(`+`, 34)
no compiles(4+5.0 * "hallo")
no compiles(undeclaredIdentifier)
no compiles(undeclaredIdentifier)