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" {
6262var a_promise: promise = undefined;
6363var result = false;
6464async fn testSuspendBlock() void {
65 suspend |p| {
66 comptime assert(@typeOf(p) == promise->void);
67 a_promise = p;
65 suspend {
66 comptime assert(@typeOf(@handle()) == promise->void);
67 a_promise = @handle();
6868 }
6969
7070 //Test to make sure that @handle() works as advertised (issue #1296)
......@@ -98,9 +98,9 @@ async fn await_amain() void {
9898}
9999async fn await_another() i32 {
100100 await_seq('c');
101 suspend |p| {
101 suspend {
102102 await_seq('d');
103 await_a_promise = p;
103 await_a_promise = @handle();
104104 }
105105 await_seq('g');
106106 return 1234;