Fixes #6832
This commit is contained in:
Dmitry Atamanov 2018-05-19 18:32:18 +03:00 • committed by GitHub
commit 94c45136ea
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -3808,7 +3808,9 @@ template doAssert*(cond: bool, msg = "") =
bind instantiationInfo
{.line: instantiationInfo().}:
if not cond:
raiseAssert(astToStr(cond) & ' ' & msg)
raiseAssert(astToStr(cond) & ' ' &
instantiationInfo(-1, false).fileName & '(' &
$instantiationInfo(-1, false).line & ") " & msg)
iterator items*[T](a: seq[T]): T {.inline.} =
## iterates over each item of `a`.