From b5f463c3f638e222e9e757bf8358c396d9f06bd6 Mon Sep 17 00:00:00 2001 From: Timothee Cour Date: Mon, 10 Sep 2018 13:21:32 -0700 Subject: fix #8928 --- lib/system.nim | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'lib/system.nim') 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 -- cgit 1.4.1-2-gfad0