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

Tracking Issue #1296 ;
This commit is contained in:
kristopher tate 2018-07-29 17:17:48 +09:00
parent 79792a32e1
commit 3241ada468

View File

@ -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;