Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/language/expressions/arrow-function/rest-params-trailing-comma-early-error.js

raw
1 // This file was procedurally generated from the following sources:
2 // - src/function-forms/rest-params-trailing-comma-early-error.case
3 // - src/function-forms/syntax/arrow-function.template
4 /*---
5 description: It's a syntax error if a FunctionRestParameter is followed by a trailing comma (arrow function expression)
6 esid: sec-arrow-function-definitions-runtime-semantics-evaluation
7 flags: [generated]
8 negative:
9 phase: parse
10 type: SyntaxError
11 info: |
12 ArrowFunction : ArrowParameters => ConciseBody
13
14 [...]
15 4. Let closure be FunctionCreate(Arrow, parameters, ConciseBody, scope, strict).
16 [...]
17
18 9.2.1 [[Call]] ( thisArgument, argumentsList)
19
20 [...]
21 7. Let result be OrdinaryCallEvaluateBody(F, argumentsList).
22 [...]
23
24 9.2.1.3 OrdinaryCallEvaluateBody ( F, argumentsList )
25
26 1. Let status be FunctionDeclarationInstantiation(F, argumentsList).
27 [...]
28
29 9.2.12 FunctionDeclarationInstantiation(func, argumentsList)
30
31 [...]
32 23. Let iteratorRecord be Record {[[iterator]]:
33 CreateListIterator(argumentsList), [[done]]: false}.
34 24. If hasDuplicates is true, then
35 [...]
36 25. Else,
37 b. Let formalStatus be IteratorBindingInitialization for formals with
38 iteratorRecord and env as arguments.
39 [...]
40
41 Trailing comma in the parameters list
42
43 14.1 Function Definitions
44
45 FormalParameters[Yield, Await] :
46 [empty]
47 FunctionRestParameter[?Yield, ?Await]
48 FormalParameterList[?Yield, ?Await]
49 FormalParameterList[?Yield, ?Await] ,
50 FormalParameterList[?Yield, ?Await] , FunctionRestParameter[?Yield, ?Await]
51 ---*/
52 throw "Test262: This statement should not be evaluated.";
53
54 0, (...a,) => {
55
56 };