commit 3241ada4682b6953431876edfb8fc7af0f346a34 (tree)
parent 79792a32e19b5ef7a918655f09ac32dd94c8f19e
Author: kristopher tate <kt@connectfree.co.jp>
Date: Sun, 29 Jul 2018 17:17:48 +0900
test/cases/coroutines.zig: update test to reflect that the promise symbol is no in scope with suspend;
Tracking Issue #1296 ;
Diffstat:
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git 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;