assertions: make assert follow excessiveStackTrace (#11574)

(cherry picked from commit 403fd3ac43)
This commit is contained in:
alaviss
2019-06-25 05:23:22 +07:00
committed by narimiran
parent a5a62b562f
commit 98b9ffa3a4

View File

@@ -31,9 +31,7 @@ template assertImpl(cond: bool, msg: string, expr: string, enabled: static[bool]
bind instantiationInfo
mixin failedAssertImpl
when enabled:
# for stacktrace; fixes #8928 ; Note: `fullPaths = true` is correct
# here, regardless of --excessiveStackTrace
{.line: instantiationInfo(fullPaths = true).}:
{.line: instantiationInfo(fullPaths = compileOption("excessiveStackTrace")).}:
if not cond:
failedAssertImpl(loc & " `" & expr & "` " & msg)