doAssert, assert now print full path of failing line on error (#8555)
This commit is contained in:
parent
81f920a4ee
commit
3a626179ee
6 changed files with 109 additions and 32 deletions
|
|
@ -8,6 +8,7 @@
|
|||
#
|
||||
|
||||
include "system/inclrtl"
|
||||
include "system/helpers"
|
||||
|
||||
## This module contains the interface to the compiler's abstract syntax
|
||||
## tree (`AST`:idx:). Macros operate on this tree.
|
||||
|
|
@ -422,7 +423,8 @@ type
|
|||
line*,column*: int
|
||||
|
||||
proc `$`*(arg: Lineinfo): string =
|
||||
result = arg.filename & "(" & $arg.line & ", " & $arg.column & ")"
|
||||
# BUG: without `result = `, gives compile error
|
||||
result = lineInfoToString(arg.filename, arg.line, arg.column)
|
||||
|
||||
#proc lineinfo*(n: NimNode): LineInfo {.magic: "NLineInfo", noSideEffect.}
|
||||
## returns the position the node appears in the original source file
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue