| 1 |
// This file was procedurally generated from the following sources: |
| 2 |
// - src/function-forms/dflt-params-duplicates.case |
| 3 |
// - src/function-forms/syntax/async-gen-named-func-expr.template |
| 4 |
/*--- |
| 5 |
description: It is a Syntax Error if BoundNames of FormalParameters contains any duplicate elements. (async generator named function expression) |
| 6 |
esid: sec-asyncgenerator-definitions-evaluation |
| 7 |
features: [default-parameters, async-iteration] |
| 8 |
flags: [generated] |
| 9 |
negative: |
| 10 |
phase: parse |
| 11 |
type: SyntaxError |
| 12 |
info: | |
| 13 |
AsyncGeneratorExpression : async [no LineTerminator here] function * BindingIdentifier |
| 14 |
( FormalParameters ) { AsyncGeneratorBody } |
| 15 |
|
| 16 |
[...] |
| 17 |
7. Let closure be ! AsyncGeneratorFunctionCreate(Normal, FormalParameters, |
| 18 |
AsyncGeneratorBody, funcEnv, strict). |
| 19 |
[...] |
| 20 |
|
| 21 |
|
| 22 |
14.1.2 Static Semantics: Early Errors |
| 23 |
|
| 24 |
StrictFormalParameters : FormalParameters |
| 25 |
|
| 26 |
- It is a Syntax Error if BoundNames of FormalParameters contains any |
| 27 |
duplicate elements. |
| 28 |
|
| 29 |
FormalParameters : FormalParameterList |
| 30 |
|
| 31 |
- It is a Syntax Error if IsSimpleParameterList of FormalParameterList is |
| 32 |
false and BoundNames of FormalParameterList contains any duplicate |
| 33 |
elements. |
| 34 |
|
| 35 |
---*/ |
| 36 |
throw "Test262: This statement should not be evaluated."; |
| 37 |
|
| 38 |
|
| 39 |
0, async function* g(x = 0, x) { |
| 40 |
|
| 41 |
}; |