doc/langref.html.in: update docs to reflect that the promise symbol is no in scope with suspend;
Tracking Issue #1296 ;
This commit is contained in:
parent
51955a5ca2
commit
ff4a03f351
|
@ -4690,9 +4690,9 @@ test "coroutine suspend with block" {
|
||||||
var a_promise: promise = undefined;
|
var a_promise: promise = undefined;
|
||||||
var result = false;
|
var result = false;
|
||||||
async fn testSuspendBlock() void {
|
async fn testSuspendBlock() void {
|
||||||
suspend |p| {
|
suspend {
|
||||||
comptime assert(@typeOf(p) == promise->void);
|
comptime assert(@typeOf(@handle()) == promise->void);
|
||||||
a_promise = p;
|
a_promise = @handle();
|
||||||
}
|
}
|
||||||
result = true;
|
result = true;
|
||||||
}
|
}
|
||||||
|
@ -4791,9 +4791,9 @@ async fn amain() void {
|
||||||
}
|
}
|
||||||
async fn another() i32 {
|
async fn another() i32 {
|
||||||
seq('c');
|
seq('c');
|
||||||
suspend |p| {
|
suspend {
|
||||||
seq('d');
|
seq('d');
|
||||||
a_promise = p;
|
a_promise = @handle();
|
||||||
}
|
}
|
||||||
seq('g');
|
seq('g');
|
||||||
return 1234;
|
return 1234;
|
||||||
|
@ -7388,7 +7388,7 @@ Defer(body) = ("defer" | "deferror") body
|
||||||
|
|
||||||
IfExpression(body) = "if" "(" Expression ")" body option("else" BlockExpression(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)
|
IfErrorExpression(body) = "if" "(" Expression ")" option("|" option("*") Symbol "|") body "else" "|" Symbol "|" BlockExpression(body)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user