summary refs log tree commit diff stats
path: root/lib/system.nim
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2018-09-12 10:28:57 +0200
committerGitHub <noreply@github.com>2018-09-12 10:28:57 +0200
commit8f046792cf30c01cf03d687069baa36b837c62dc (patch)
tree569ebdcbdb5f42a2ba2d7eaf0c9e6b16e6b7b626 /lib/system.nim
parent132eb31e32844a6cb312d9d33d62c522772548b9 (diff)
parent72170b443d126ffadf35d874cc4d90aa8f843788 (diff)
downloadNim-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.nim7
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