diff options
author | Zahary Karadjov <zahary@gmail.com> | 2013-01-27 19:52:24 +0200 |
---|---|---|
committer | Zahary Karadjov <zahary@gmail.com> | 2013-01-27 19:52:24 +0200 |
commit | 0d77909b1711d0e2fa4b1bc2be0ddce2e50ee487 (patch) | |
tree | 2bd699d2b84c35bdb4142db952fea4a740b28b8b /compiler | |
parent | 31134a6bae49e4faa02252d7cc6797e825f62f46 (diff) | |
download | Nim-0d77909b1711d0e2fa4b1bc2be0ddce2e50ee487.tar.gz |
fixed a regression in `nimrod i`
Diffstat (limited to 'compiler')
-rwxr-xr-x | compiler/main.nim | 4 | ||||
-rwxr-xr-x | compiler/msgs.nim | 3 |
2 files changed, 4 insertions, 3 deletions
diff --git a/compiler/main.nim b/compiler/main.nim index 8a563e424..06d16ed08 100755 --- a/compiler/main.nim +++ b/compiler/main.nim @@ -324,7 +324,7 @@ proc InteractivePasses = var stdinModule: PSym proc makeStdinModule: PSym = if stdinModule == nil: - stdinModule = newModule(gCmdLineInfo.fileIndex) + stdinModule = newModule(fileInfoIdx"stdin") stdinModule.id = getID() result = stdinModule @@ -333,7 +333,7 @@ proc CommandInteractive = InteractivePasses() compileSystemModule() if commandArgs.len > 0: - discard CompileModule(gProjectMainIdx, {}) + discard CompileModule(fileInfoIdx(gProjectFull), {}) else: var m = makeStdinModule() incl(m.flags, sfMainModule) diff --git a/compiler/msgs.nim b/compiler/msgs.nim index 2a66e5c97..587ac4867 100755 --- a/compiler/msgs.nim +++ b/compiler/msgs.nim @@ -485,7 +485,8 @@ proc fileInfoIdx*(filename: string): int32 = result = filenameToIndexTbl[canon] else: result = fileInfos.len.int32 - fileInfos.add(newFileInfo(canon, if pseudoPath: "" else: canon.shortenDir)) + fileInfos.add(newFileInfo(canon, if pseudoPath: filename + else: canon.shortenDir)) filenameToIndexTbl[canon] = result proc newLineInfo*(fileInfoIdx: int32, line, col: int): TLineInfo = |