fix off by 1 error in col shown by toFileLineCol (#10138)
* fix off by 1 error in `col` shown by toFileLineCol * fix test failures
This commit is contained in:
parent
7ac1fc81fd
commit
ab72d68ec8
4 changed files with 4 additions and 4 deletions
|
|
@ -208,7 +208,7 @@ proc toFileLine*(conf: ConfigRef; info: TLineInfo): string {.inline.} =
|
|||
result = toFilename(conf, info) & ":" & $info.line
|
||||
|
||||
proc toFileLineCol*(conf: ConfigRef; info: TLineInfo): string {.inline.} =
|
||||
result = toFilename(conf, info) & "(" & $info.line & ", " & $info.col & ")"
|
||||
result = toFilename(conf, info) & "(" & $info.line & ", " & $(info.col+1) & ")"
|
||||
|
||||
proc `$`*(conf: ConfigRef; info: TLineInfo): string = toFileLineCol(conf, info)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue