Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/language/expressions/object/method-definition/gen-meth-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-meth.template
4 /*---
5 description: It is a Syntax Error if BoundNames of FormalParameters contains any duplicate elements. (generator method)
6 esid: sec-generator-function-definitions-runtime-semantics-propertydefinitionevaluation
7 features: [default-parameters, generators]
8 flags: [generated]
9 negative:
10 phase: parse
11 type: SyntaxError
12 info: |
13 GeneratorMethod :
14 * PropertyName ( StrictFormalParameters ) { GeneratorBody }
15
16 1. Let propKey be the result of evaluating PropertyName.
17 2. ReturnIfAbrupt(propKey).
18 3. If the function code for this GeneratorMethod is strict mode code,
19 let strict be true. Otherwise let strict be false.
20 4. Let scope be the running execution context's LexicalEnvironment.
21 5. Let closure be GeneratorFunctionCreate(Method,
22 StrictFormalParameters, GeneratorBody, scope, strict).
23 [...]
24
25 9.2.1 [[Call]] ( thisArgument, argumentsList)
26
27 [...]
28 7. Let result be OrdinaryCallEvaluateBody(F, argumentsList).
29 [...]
30
31 9.2.1.3 OrdinaryCallEvaluateBody ( F, argumentsList )
32
33 1. Let status be FunctionDeclarationInstantiation(F, argumentsList).
34 [...]
35
36 9.2.12 FunctionDeclarationInstantiation(func, argumentsList)
37
38 [...]
39 23. Let iteratorRecord be Record {[[iterator]]:
40 CreateListIterator(argumentsList), [[done]]: false}.
41 24. If hasDuplicates is true, then
42 [...]
43 25. Else,
44 b. Let formalStatus be IteratorBindingInitialization for formals with
45 iteratorRecord and env as arguments.
46 [...]
47
48
49 14.1.2 Static Semantics: Early Errors
50
51 StrictFormalParameters : FormalParameters
52
53 - It is a Syntax Error if BoundNames of FormalParameters contains any
54 duplicate elements.
55
56 FormalParameters : FormalParameterList
57
58 - It is a Syntax Error if IsSimpleParameterList of FormalParameterList is
59 false and BoundNames of FormalParameterList contains any duplicate
60 elements.
61
62 ---*/
63 throw "Test262: This statement should not be evaluated.";
64
65 0, {
66 *method(x = 0, x) {
67
68 }
69 };