diff --git a/tests/async/tasync_error_tracking.nim b/tests/async/tasync_error_tracking.nim index a6da226f0235..c15a41ce81d9 100644 --- a/tests/async/tasync_error_tracking.nim +++ b/tests/async/tasync_error_tracking.nim @@ -6,6 +6,18 @@ proc err(throw: bool) = if throw: raise newException(MyError, "myerr") +block: + proc bar() {.async.} = + err(false) + + proc foo() {.async.} = + await bar() + + proc main {.async, raises: [MyError].} = + await foo() + + waitFor main() + block: proc foo() {.async, raises: [MyError].} = err(false)