replaces doAssert false with raiseAssert for unreachable branches, which works better with strictdefs (#22436)

replaces `doAssert false` with `raiseAssert`, which works better with strictdefs
This commit is contained in:
ringabout
2023-08-10 20:26:40 +08:00
committed by GitHub
parent 8523b543d6
commit 7be2e2bef5
21 changed files with 34 additions and 42 deletions

View File

@@ -243,7 +243,7 @@ proc registerAdditionalOps*(c: PCtx) =
case n
of 1: setResult(a, round(getFloat(a, 0)))
of 2: setResult(a, round(getFloat(a, 0), getInt(a, 1).int))
else: doAssert false, $n
else: raiseAssert $n
proc `mod Wrapper`(a: VmArgs) {.nimcall.} =
setResult(a, `mod`(getFloat(a, 0), getFloat(a, 1)))