authorgravatar for kt@connectfree.co.jpkristopher tate <kt@connectfree.co.jp> 2018-07-29 17:19:36+09:00
committergravatar for kt@connectfree.co.jpkristopher tate <kt@connectfree.co.jp> 2018-08-02 17:03:39+09:00
logff4a03f35157c3c82d581a599bf98db86504ecc1
treef8e677cf07c3f6d5eb47217e0f30d151a192b383
parent51955a5ca2b6f3f005e28cd3758dc481c2eea0c3

doc/langref.html.in: update docs to reflect that the promise symbol is no in scope with suspend;

Tracking Issue #1296 ;

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

doc/langref.html.in+6-6
...@@ -4690,9 +4690,9 @@ test "coroutine suspend with block" {...@@ -4690,9 +4690,9 @@ test "coroutine suspend with block" {
4690var a_promise: promise = undefined;4690var a_promise: promise = undefined;
4691var result = false;4691var result = false;
4692async fn testSuspendBlock() void {4692async fn testSuspendBlock() void {
4693 suspend |p| {4693 suspend {
4694 comptime assert(@typeOf(p) == promise->void);4694 comptime assert(@typeOf(@handle()) == promise->void);
4695 a_promise = p;4695 a_promise = @handle();
4696 }4696 }
4697 result = true;4697 result = true;
4698}4698}
...@@ -4791,9 +4791,9 @@ async fn amain() void {...@@ -4791,9 +4791,9 @@ async fn amain() void {
4791}4791}
4792async fn another() i32 {4792async fn another() i32 {
4793 seq('c');4793 seq('c');
4794 suspend |p| {4794 suspend {
4795 seq('d');4795 seq('d');
4796 a_promise = p;4796 a_promise = @handle();
4797 }4797 }
4798 seq('g');4798 seq('g');
4799 return 1234;4799 return 1234;
...@@ -7388,7 +7388,7 @@ Defer(body) = ("defer" | "deferror") body...@@ -7388,7 +7388,7 @@ Defer(body) = ("defer" | "deferror") body
73887388
7389IfExpression(body) = "if" "(" Expression ")" body option("else" BlockExpression(body))7389IfExpression(body) = "if" "(" Expression ")" body option("else" BlockExpression(body))
73907390
7391SuspendExpression(body) = "suspend" option(("|" Symbol "|" body))7391SuspendExpression(body) = "suspend" option( body )
73927392
7393IfErrorExpression(body) = "if" "(" Expression ")" option("|" option("*") Symbol "|") body "else" "|" Symbol "|" BlockExpression(body)7393IfErrorExpression(body) = "if" "(" Expression ")" option("|" option("*") Symbol "|") body "else" "|" Symbol "|" BlockExpression(body)
73947394