From ff4a03f35157c3c82d581a599bf98db86504ecc1 Mon Sep 17 00:00:00 2001 From: kristopher tate Date: Sun, 29 Jul 2018 17:19:36 +0900 Subject: [PATCH] doc/langref.html.in: update docs to reflect that the promise symbol is no in scope with suspend; Tracking Issue #1296 ; --- doc/langref.html.in | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/doc/langref.html.in b/doc/langref.html.in index 7fde55033..58b63f7f4 100644 --- a/doc/langref.html.in +++ b/doc/langref.html.in @@ -4690,9 +4690,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(); } result = true; } @@ -4791,9 +4791,9 @@ async fn amain() void { } async fn another() i32 { seq('c'); - suspend |p| { + suspend { seq('d'); - a_promise = p; + a_promise = @handle(); } seq('g'); return 1234; @@ -7388,7 +7388,7 @@ Defer(body) = ("defer" | "deferror") body IfExpression(body) = "if" "(" Expression ")" body option("else" BlockExpression(body)) -SuspendExpression(body) = "suspend" option(("|" Symbol "|" body)) +SuspendExpression(body) = "suspend" option( body ) IfErrorExpression(body) = "if" "(" Expression ")" option("|" option("*") Symbol "|") body "else" "|" Symbol "|" BlockExpression(body)