diff --git a/test/cases/coroutines.zig b/test/cases/coroutines.zig index 53c5c3f90..c2aeb5de8 100644 --- a/test/cases/coroutines.zig +++ b/test/cases/coroutines.zig @@ -62,9 +62,9 @@ test "coroutine suspend with block" { var a_promise: promise = undefined; var result = false; async fn testSuspendBlock() void { - suspend |p| { - comptime assert(@typeOf(p) == promise->void); - a_promise = p; + suspend { + comptime assert(@typeOf(@handle()) == promise->void); + a_promise = @handle(); } //Test to make sure that @handle() works as advertised (issue #1296) @@ -98,9 +98,9 @@ async fn await_amain() void { } async fn await_another() i32 { await_seq('c'); - suspend |p| { + suspend { await_seq('d'); - await_a_promise = p; + await_a_promise = @handle(); } await_seq('g'); return 1234;