Debian Codegraph @

js/src/tests/test262/language/expressions/arrow-function/dflt-params-duplicates.js

raw
1 // |reftest| error:SyntaxError
2 // This file was procedurally generated from the following sources:
3 // - src/function-forms/dflt-params-duplicates.case
4 // - src/function-forms/syntax/arrow-function.template
5 /*---
6 description: It is a Syntax Error if BoundNames of FormalParameters contains any duplicate elements. (arrow function expression)
7 esid: sec-arrow-function-definitions-runtime-semantics-evaluation
8 features: [default-parameters]
9 flags: [generated]
10 negative:
11 phase: parse
12 type: SyntaxError
13 info: |
14 ArrowFunction : ArrowParameters => ConciseBody
15
16 [...]
17 4. Let closure be FunctionCreate(Arrow, parameters, ConciseBody, 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 14.1.2 Static Semantics: Early Errors
44
45 StrictFormalParameters : FormalParameters
46
47 - It is a Syntax Error if BoundNames of FormalParameters contains any
48 duplicate elements.
49
50 FormalParameters : FormalParameterList
51
52 - It is a Syntax Error if IsSimpleParameterList of FormalParameterList is
53 false and BoundNames of FormalParameterList contains any duplicate
54 elements.
55
56 ---*/
57 $DONOTEVALUATE();
58
59 0, (x = 0, x) => {
60
61 };