diff options
author | Ico Doornekamp <ico@pruts.nl> | 2019-08-28 12:05:07 +0200 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2019-08-28 12:05:07 +0200 |
commit | 84351da9d85867083de9376f7e08b1c840be6bc0 (patch) | |
tree | 0ab86a9e29dc179609d16a0e9b00d3e09bc7adca | |
parent | d4af0554c43fc6db8c1078169be0c216a00c1628 (diff) | |
download | Nim-84351da9d85867083de9376f7e08b1c840be6bc0.tar.gz |
Fixes #12044 (#12071)
-rw-r--r-- | lib/system/assertions.nim | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/system/assertions.nim b/lib/system/assertions.nim index 0deb957c9..2131394e0 100644 --- a/lib/system/assertions.nim +++ b/lib/system/assertions.nim @@ -27,12 +27,12 @@ proc failedAssertImpl*(msg: string) {.raises: [], tags: [].} = Hide(raiseAssert)(msg) template assertImpl(cond: bool, msg: string, expr: string, enabled: static[bool]) = - const - loc = instantiationInfo(fullPaths = compileOption("excessiveStackTrace")) - ploc = $loc - bind instantiationInfo - mixin failedAssertImpl when enabled: + const + loc = instantiationInfo(fullPaths = compileOption("excessiveStackTrace")) + ploc = $loc + bind instantiationInfo + mixin failedAssertImpl {.line: loc.}: if not cond: failedAssertImpl(ploc & " `" & expr & "` " & msg) |