diff options
author | Simon Krauter <krauter.simon@arcor.de> | 2014-10-15 00:20:08 +0200 |
---|---|---|
committer | Simon Krauter <krauter.simon@arcor.de> | 2014-10-15 00:20:08 +0200 |
commit | 27585ee6ecd0dd2f7673b800e921ec2b3850e608 (patch) | |
tree | 0794a8d347e875f4f235621272e69ab1a2677332 | |
parent | 849484f9202c66567a8e6937198498ef8a75f558 (diff) | |
download | Nim-27585ee6ecd0dd2f7673b800e921ec2b3850e608.tar.gz |
Compare fileIndexes instead of file names
-rw-r--r-- | compiler/importer.nim | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/importer.nim b/compiler/importer.nim index 4a0d83c66..9e327c8f7 100644 --- a/compiler/importer.nim +++ b/compiler/importer.nim @@ -159,7 +159,7 @@ proc myImportModule(c: PContext, n: PNode): PSym = var f = checkModuleName(n) if f != InvalidFileIDX: result = importModuleAs(n, gImportModule(c.module, f)) - if result.name.s == fileInfos[n.info.fileIndex].shortName: + if result.info.fileIndex == n.info.fileIndex: localError(n.info, errGenerated, "A module cannot import itself") if sfDeprecated in result.flags: message(n.info, warnDeprecated, result.name.s) |