tester cleanup; enable some rod tests

This commit is contained in:
Araq 2016-08-27 13:38:39 +02:00
commit 68e30d7d52
6 changed files with 31 additions and 25 deletions

View file

@ -163,7 +163,7 @@ proc myImportModule(c: PContext, n: PNode): PSym =
var f = checkModuleName(n)
if f != InvalidFileIDX:
result = importModuleAs(n, gImportModule(c.module, f))
if result.info.fileIndex == n.info.fileIndex:
if result.info.fileIndex == c.module.info.fileIndex:
localError(n.info, errGenerated, "A module cannot import itself")
if sfDeprecated in result.flags:
message(n.info, warnDeprecated, result.name.s)