bugfix: unreported 'compiles' bug
This commit is contained in:
parent
4f946cb44e
commit
3dfb4891c7
2 changed files with 3 additions and 1 deletions
|
|
@ -92,7 +92,7 @@ proc errorSym*(c: PContext, n: PNode): PSym =
|
||||||
result.typ = errorType(c)
|
result.typ = errorType(c)
|
||||||
incl(result.flags, sfDiscardable)
|
incl(result.flags, sfDiscardable)
|
||||||
# pretend it's imported from some unknown module to prevent cascading errors:
|
# 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)
|
c.importTable.addSym(result)
|
||||||
|
|
||||||
type
|
type
|
||||||
|
|
|
||||||
|
|
@ -24,3 +24,5 @@ ok supports(`+`, 34)
|
||||||
|
|
||||||
no compiles(4+5.0 * "hallo")
|
no compiles(4+5.0 * "hallo")
|
||||||
|
|
||||||
|
no compiles(undeclaredIdentifier)
|
||||||
|
no compiles(undeclaredIdentifier)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue