diff options
author | ringabout <43030857+ringabout@users.noreply.github.com> | 2023-08-12 00:24:46 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-11 18:24:46 +0200 |
commit | 3f7e1d7daadf4002da1a155d7b98ff7fcca9e2fa (patch) | |
tree | ca733c386244be34e2d0e53b8f79d4e2844b8794 /lib/pure/coro.nim | |
parent | 48da472dd2e625d2d794907afd33a4a153fa2dc1 (diff) | |
download | Nim-3f7e1d7daadf4002da1a155d7b98ff7fcca9e2fa.tar.gz |
replace `doAssert false` with `raiseAssert` in lib, which works better with strictdefs (#22458)
Diffstat (limited to 'lib/pure/coro.nim')
-rw-r--r-- | lib/pure/coro.nim | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/pure/coro.nim b/lib/pure/coro.nim index 7f0f551e6..5cdcb75fe 100644 --- a/lib/pure/coro.nim +++ b/lib/pure/coro.nim @@ -224,7 +224,7 @@ proc switchTo(current, to: CoroutinePtr) = elif to.state == CORO_CREATED: # Coroutine is started. coroExecWithStack(runCurrentTask, to.stack.bottom) - #doAssert false + #raiseAssert "unreachable" else: {.error: "Invalid coroutine backend set.".} # Execution was just resumed. Restore frame information and set active stack. @@ -266,7 +266,7 @@ proc runCurrentTask() = current.state = CORO_FINISHED nimGC_setStackBottom(ctx.ncbottom) suspend(0) # Exit coroutine without returning from coroExecWithStack() - doAssert false + raiseAssert "unreachable" proc start*(c: proc(), stacksize: int = defaultStackSize): CoroutineRef {.discardable.} = ## Schedule coroutine for execution. It does not run immediately. |