diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2018-09-12 10:28:57 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-12 10:28:57 +0200 |
commit | 8f046792cf30c01cf03d687069baa36b837c62dc (patch) | |
tree | 569ebdcbdb5f42a2ba2d7eaf0c9e6b16e6b7b626 /lib/system.nim | |
parent | 132eb31e32844a6cb312d9d33d62c522772548b9 (diff) | |
parent | 72170b443d126ffadf35d874cc4d90aa8f843788 (diff) | |
download | Nim-8f046792cf30c01cf03d687069baa36b837c62dc.tar.gz |
Merge pull request #8941 from timotheecour/pr_fix_8928
fix #8928 regression
Diffstat (limited to 'lib/system.nim')
-rw-r--r-- | lib/system.nim | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/system.nim b/lib/system.nim index 4552c6304..caa6e9bfd 100644 --- a/lib/system.nim +++ b/lib/system.nim @@ -3784,8 +3784,11 @@ template assertImpl(cond: bool, msg = "", enabled: static[bool]) = bind instantiationInfo mixin failedAssertImpl when enabled: - if not cond: - failedAssertImpl(loc & " `" & astToStr(cond) & "` " & msg) + # for stacktrace; fixes #8928 ; Note: `fullPaths = true` is correct + # here, regardless of --excessiveStackTrace + {.line: instantiationInfo(fullPaths = true).}: + if not cond: + failedAssertImpl(loc & " `" & astToStr(cond) & "` " & msg) template assert*(cond: bool, msg = "") = ## Raises ``AssertionError`` with `msg` if `cond` is false. Note |