authorgravatar for kt@connectfree.co.jpkristopher tate <kt@connectfree.co.jp> 2018-07-29 17:17:48+09:00
committergravatar for kt@connectfree.co.jpkristopher tate <kt@connectfree.co.jp> 2018-08-02 17:02:14+09:00
log3241ada4682b6953431876edfb8fc7af0f346a34
tree04e8c779a9f15aa066244da5959af05b1c79126c
parent79792a32e19b5ef7a918655f09ac32dd94c8f19e

test/cases/coroutines.zig: update test to reflect that the promise symbol is no in scope with suspend;

Tracking Issue #1296 ;

1 files changed, 5 insertions(+), 5 deletions(-)

test/cases/coroutines.zig+5-5
...@@ -62,9 +62,9 @@ test "coroutine suspend with block" {...@@ -62,9 +62,9 @@ test "coroutine suspend with block" {
62var a_promise: promise = undefined;62var a_promise: promise = undefined;
63var result = false;63var result = false;
64async fn testSuspendBlock() void {64async fn testSuspendBlock() void {
65 suspend |p| {65 suspend {
66 comptime assert(@typeOf(p) == promise->void);66 comptime assert(@typeOf(@handle()) == promise->void);
67 a_promise = p;67 a_promise = @handle();
68 }68 }
6969
70 //Test to make sure that @handle() works as advertised (issue #1296)70 //Test to make sure that @handle() works as advertised (issue #1296)
...@@ -98,9 +98,9 @@ async fn await_amain() void {...@@ -98,9 +98,9 @@ async fn await_amain() void {
98}98}
99async fn await_another() i32 {99async fn await_another() i32 {
100 await_seq('c');100 await_seq('c');
101 suspend |p| {101 suspend {
102 await_seq('d');102 await_seq('d');
103 await_a_promise = p;103 await_a_promise = @handle();
104 }104 }
105 await_seq('g');105 await_seq('g');
106 return 1234;106 return 1234;