diff options
| author | Rick Waldron <waldron.rick@gmail.com> | 2017-05-31 16:04:56 -0400 |
|---|---|---|
| committer | Rick Waldron <waldron.rick@gmail.com> | 2017-05-31 16:04:56 -0400 |
| commit | 3bff862ca7f54e2bad646b8bfac8028873594c3b (patch) | |
| tree | af57528a690ec1108026cb3333e8f1635104ebce /src/dstr-assignment-for-await/error-async-function-syntax | |
| parent | 60a6a7c81e99d83faf4b14be3f264b7a94e6882f (diff) | |
| download | qtdeclarative-testsuites-3bff862ca7f54e2bad646b8bfac8028873594c3b.tar.gz | |
src/dstr-assignment-async-iteration -> src/dstr-assignment-for-await
Signed-off-by: Rick Waldron <waldron.rick@gmail.com>
Diffstat (limited to 'src/dstr-assignment-for-await/error-async-function-syntax')
| -rw-r--r-- | src/dstr-assignment-for-await/error-async-function-syntax/async-func-decl.template | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/dstr-assignment-for-await/error-async-function-syntax/async-func-decl.template b/src/dstr-assignment-for-await/error-async-function-syntax/async-func-decl.template new file mode 100644 index 000000000..a6d537c9e --- /dev/null +++ b/src/dstr-assignment-for-await/error-async-function-syntax/async-func-decl.template @@ -0,0 +1,30 @@ +// Copyright (C) 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +path: language/statements/for-await-of/async-func-decl-dstr- +name: for-await-of statement in an async function declaration +esid: sec-for-in-and-for-of-statements-runtime-semantics-labelledevaluation +features: [destructuring-binding, async-iteration] +flags: [async] +info: | + IterationStatement : + for await ( LeftHandSideExpression of AssignmentExpression ) Statement + + 1. Let keyResult be the result of performing ? ForIn/OfHeadEvaluation(« », + AssignmentExpression, iterate). + 2. Return ? ForIn/OfBodyEvaluation(LeftHandSideExpression, Statement, + keyResult, assignment, labelSet). + + 13.7.5.13 Runtime Semantics: ForIn/OfBodyEvaluation + + [...] + 5. If destructuring is true and if lhsKind is assignment, then + a. Assert: lhs is a LeftHandSideExpression. + b. Let assignmentPattern be the parse of the source text corresponding to + lhs using AssignmentPattern as the goal symbol. + [...] +---*/ + +async function fn() { + for await (/*{ elems }*/ of [/*{ vals }*/]) +} |
