Merge pull request #8941 from timotheecour/pr_fix_8928
fix #8928 regression
This commit is contained in:
commit
8f046792cf
2 changed files with 24 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue