Debian Codegraph @

js/src/tests/test262/language/expressions/async-generator/dflt-params-rest.js

raw
1 // |reftest| error:SyntaxError
2 // This file was procedurally generated from the following sources:
3 // - src/function-forms/dflt-params-rest.case
4 // - src/function-forms/syntax/async-gen-func-expr.template
5 /*---
6 description: RestParameter does not support an initializer (async generator function expression)
7 esid: sec-asyncgenerator-definitions-evaluation
8 features: [default-parameters, async-iteration]
9 flags: [generated]
10 negative:
11 phase: parse
12 type: SyntaxError
13 info: |
14 AsyncGeneratorExpression : async [no LineTerminator here] function * ( FormalParameters ) {
15 AsyncGeneratorBody }
16
17 [...]
18 3. Let closure be ! AsyncGeneratorFunctionCreate(Normal, FormalParameters,
19 AsyncGeneratorBody, scope, strict).
20 [...]
21
22
23 14.1 Function Definitions
24
25 Syntax
26
27 FunctionRestParameter[Yield] :
28
29 BindingRestElement[?Yield]
30
31 13.3.3 Destructuring Binding Patterns
32
33 Syntax
34
35 BindingRestElement[Yield] :
36
37 ...BindingIdentifier[?Yield]
38 ...BindingPattern[?Yield]
39
40 ---*/
41 $DONOTEVALUATE();
42
43
44 0, async function*(...x = []) {
45
46 };