Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/language/expressions/generators/dflt-params-duplicates.js

raw
1 // This file was procedurally generated from the following sources:
2 // - src/function-forms/dflt-params-duplicates.case
3 // - src/function-forms/syntax/gen-func-expr.template
4 /*---
5 description: It is a Syntax Error if BoundNames of FormalParameters contains any duplicate elements. (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.2 Static Semantics: Early Errors
45
46 StrictFormalParameters : FormalParameters
47
48 - It is a Syntax Error if BoundNames of FormalParameters contains any
49 duplicate elements.
50
51 FormalParameters : FormalParameterList
52
53 - It is a Syntax Error if IsSimpleParameterList of FormalParameterList is
54 false and BoundNames of FormalParameterList contains any duplicate
55 elements.
56
57 ---*/
58 throw "Test262: This statement should not be evaluated.";
59
60 0, function*(x = 0, x) {
61
62 };