mirror of
https://github.com/nim-lang/Nim.git
synced 2026-05-05 21:44:46 +00:00
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:
@@ -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)))
|
||||
|
||||
Reference in New Issue
Block a user