diff options
Diffstat (limited to 'lib/system.nim')
-rwxr-xr-x | lib/system.nim | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/system.nim b/lib/system.nim index d9d3ebd86..11188a4c0 100755 --- a/lib/system.nim +++ b/lib/system.nim @@ -2129,16 +2129,16 @@ template assert*(cond: expr, msg = "") = ## Use ``assert`` for debugging purposes only. bind raiseAssert, InstantiationInfo when compileOption("assertions"): - if not cond: - {.line.}: + {.line.}: + if not cond: raiseAssert(astToStr(cond) & ' ' & msg) template doAssert*(cond: expr, msg = "") = ## same as `assert` but is always turned on and not affected by the ## ``--assertions`` command line switch. bind raiseAssert, InstantiationInfo - if not cond: - {.line: InstantiationInfo().}: + {.line: InstantiationInfo().}: + if not cond: raiseAssert(astToStr(cond) & ' ' & msg) |