summary refs log tree commit diff stats
path: root/lib/system.nim
diff options
context:
space:
mode:
authorTimothee Cour <timothee.cour2@gmail.com>2018-09-10 13:21:32 -0700
committerTimothee Cour <timothee.cour2@gmail.com>2018-09-11 11:36:15 -0700
commitb5f463c3f638e222e9e757bf8358c396d9f06bd6 (patch)
tree4b1d44b89fc96588599eb96e7ab46745464bdfe8 /lib/system.nim
parent8670f4911b742c87210b97150197080310b5ab58 (diff)
downloadNim-b5f463c3f638e222e9e757bf8358c396d9f06bd6.tar.gz
fix #8928
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 a406c7811..6dca80748 100644
--- a/lib/system.nim
+++ b/lib/system.nim
@@ -3783,8 +3783,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