| 1 |
// This file was procedurally generated from the following sources: |
| 2 |
// - src/function-forms/dflt-params-rest.case |
| 3 |
// - src/function-forms/syntax/gen-func-expr.template |
| 4 |
/*--- |
| 5 |
description: RestParameter does not support an initializer (generator function expression) |
| 6 |
esid: sec-generator-function-definitions-runtime-semantics-evaluation |
| 7 |
features: [default-parameters, generators] |
| 8 |
flags: [generated] |
| 9 |
negative: |
| 10 |
phase: parse |
| 11 |
type: SyntaxError |
| 12 |
info: | |
| 13 |
GeneratorExpression : function * ( FormalParameters ) { GeneratorBody } |
| 14 |
|
| 15 |
[...] |
| 16 |
3. Let closure be GeneratorFunctionCreate(Normal, FormalParameters, |
| 17 |
GeneratorBody, scope, strict). |
| 18 |
[...] |
| 19 |
|
| 20 |
9.2.1 [[Call]] ( thisArgument, argumentsList) |
| 21 |
|
| 22 |
[...] |
| 23 |
7. Let result be OrdinaryCallEvaluateBody(F, argumentsList). |
| 24 |
[...] |
| 25 |
|
| 26 |
9.2.1.3 OrdinaryCallEvaluateBody ( F, argumentsList ) |
| 27 |
|
| 28 |
1. Let status be FunctionDeclarationInstantiation(F, argumentsList). |
| 29 |
[...] |
| 30 |
|
| 31 |
9.2.12 FunctionDeclarationInstantiation(func, argumentsList) |
| 32 |
|
| 33 |
[...] |
| 34 |
23. Let iteratorRecord be Record {[[iterator]]: |
| 35 |
CreateListIterator(argumentsList), [[done]]: false}. |
| 36 |
24. If hasDuplicates is true, then |
| 37 |
[...] |
| 38 |
25. Else, |
| 39 |
b. Let formalStatus be IteratorBindingInitialization for formals with |
| 40 |
iteratorRecord and env as arguments. |
| 41 |
[...] |
| 42 |
|
| 43 |
|
| 44 |
14.1 Function Definitions |
| 45 |
|
| 46 |
Syntax |
| 47 |
|
| 48 |
FunctionRestParameter[Yield] : |
| 49 |
|
| 50 |
BindingRestElement[?Yield] |
| 51 |
|
| 52 |
13.3.3 Destructuring Binding Patterns |
| 53 |
|
| 54 |
Syntax |
| 55 |
|
| 56 |
BindingRestElement[Yield] : |
| 57 |
|
| 58 |
...BindingIdentifier[?Yield] |
| 59 |
...BindingPattern[?Yield] |
| 60 |
|
| 61 |
---*/ |
| 62 |
throw "Test262: This statement should not be evaluated."; |
| 63 |
|
| 64 |
0, function*(...x = []) { |
| 65 |
|
| 66 |
}; |