From 3241ada4682b6953431876edfb8fc7af0f346a34 Mon Sep 17 00:00:00 2001 From: kristopher tate Date: Sun, 29 Jul 2018 17:17:48 +0900 Subject: [PATCH] test/cases/coroutines.zig: update test to reflect that the promise symbol is no in scope with suspend; Tracking Issue #1296 ; --- test/cases/coroutines.zig | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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;