Debian Codegraph @

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