summary refs log tree commit diff stats
path: root/lib/std/genasts.nim
diff options
context:
space:
mode:
authorringabout <43030857+ringabout@users.noreply.github.com>2023-08-12 00:24:46 +0800
committerGitHub <noreply@github.com>2023-08-11 18:24:46 +0200
commit3f7e1d7daadf4002da1a155d7b98ff7fcca9e2fa (patch)
treeca733c386244be34e2d0e53b8f79d4e2844b8794 /lib/std/genasts.nim
parent48da472dd2e625d2d794907afd33a4a153fa2dc1 (diff)
downloadNim-3f7e1d7daadf4002da1a155d7b98ff7fcca9e2fa.tar.gz
replace `doAssert false` with `raiseAssert` in lib, which works better with strictdefs (#22458)
Diffstat (limited to 'lib/std/genasts.nim')
-rw-r--r--lib/std/genasts.nim2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/std/genasts.nim b/lib/std/genasts.nim
index 05b2823ef..04257533d 100644
--- a/lib/std/genasts.nim
+++ b/lib/std/genasts.nim
@@ -24,7 +24,7 @@ macro genAstOpt*(options: static set[GenAstOpt], args: varargs[untyped]): untype
       result = genAst(cond, s = repr(cond), lhs = cond[1], rhs = cond[2]):
         # each local symbol we access must be explicitly captured
         if not cond:
-          doAssert false, "'$#'' failed: lhs: '$#', rhs: '$#'" % [s, $lhs, $rhs]
+          raiseAssert "'$#'' failed: lhs: '$#', rhs: '$#'" % [s, $lhs, $rhs]
     let a = 3
     check2 a*2 == a+3
     if false: check2 a*2 < a+1 # would error with: 'a * 2 < a + 1'' failed: lhs: '6', rhs: '4'