Debian Codegraph @

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