mirror of
https://github.com/nim-lang/Nim.git
synced 2026-02-14 23:33:28 +00:00
bugfix: unreported 'compiles' bug
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -24,3 +24,5 @@ ok supports(`+`, 34)
|
||||
|
||||
no compiles(4+5.0 * "hallo")
|
||||
|
||||
no compiles(undeclaredIdentifier)
|
||||
no compiles(undeclaredIdentifier)
|
||||
|
||||
Reference in New Issue
Block a user