diff options
author | Zahary Karadjov <zahary@gmail.com> | 2013-01-20 21:53:08 +0200 |
---|---|---|
committer | Zahary Karadjov <zahary@gmail.com> | 2013-01-20 22:09:07 +0200 |
commit | 8be307713ef040c4371f51fa21c8843e5a4484f5 (patch) | |
tree | 46248b1e31a5415018fe9fdd35432a624dc062f0 /compiler/msgs.nim | |
parent | 86bf97a73001b3ffc856755a80097ee303d0492b (diff) | |
download | Nim-8be307713ef040c4371f51fa21c8843e5a4484f5.tar.gz |
fixed a regression: compiling projects not residing in the current directory
Diffstat (limited to 'compiler/msgs.nim')
-rwxr-xr-x | compiler/msgs.nim | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/compiler/msgs.nim b/compiler/msgs.nim index e45a1b0ef..2a66e5c97 100755 --- a/compiler/msgs.nim +++ b/compiler/msgs.nim @@ -561,17 +561,19 @@ proc getInfoContext*(index: int): TLineInfo = if i >=% L: result = UnknownLineInfo() else: result = msgContext[i] -proc toFilename*(info: TLineInfo): string = - if info.fileIndex < 0: result = "???" - else: result = fileInfos[info.fileIndex].projPath - proc toFilename*(fileIdx: int32): string = if fileIdx < 0: result = "???" else: result = fileInfos[fileIdx].projPath -proc toFullPath*(info: TLineInfo): string = - if info.fileIndex < 0: result = "???" - else: result = fileInfos[info.fileIndex].fullPath +proc toFullPath*(fileIdx: int32): string = + if fileIdx < 0: result = "???" + else: result = fileInfos[fileIdx].fullPath + +template toFilename*(info: TLineInfo): string = + info.fileIndex.toFilename + +template toFullPath*(info: TLineInfo): string = + info.fileIndex.toFullPath proc toLinenumber*(info: TLineInfo): int {.inline.} = result = info.line |