Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/language/expressions/async-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/async-arrow-function.template
4 /*---
5 description: It's a syntax error if a FunctionRestParameter is followed by a trailing comma (async arrow function expression)
6 esid: sec-async-arrow-function-definitions
7 flags: [generated]
8 negative:
9 phase: parse
10 type: SyntaxError
11 info: |
12 14.7 Async Arrow Function Definitions
13
14 AsyncArrowFunction :
15 ...
16 CoverCallExpressionAndAsyncArrowHead => AsyncConciseBody
17
18 AsyncConciseBody :
19 { AsyncFunctionBody }
20
21 ...
22
23 Supplemental Syntax
24
25 When processing an instance of the production AsyncArrowFunction :
26 CoverCallExpressionAndAsyncArrowHead => AsyncConciseBody the interpretation of
27 CoverCallExpressionAndAsyncArrowHead is refined using the following grammar:
28
29 AsyncArrowHead :
30 async ArrowFormalParameters
31
32 Trailing comma in the parameters list
33
34 14.1 Function Definitions
35
36 FormalParameters[Yield, Await] :
37 [empty]
38 FunctionRestParameter[?Yield, ?Await]
39 FormalParameterList[?Yield, ?Await]
40 FormalParameterList[?Yield, ?Await] ,
41 FormalParameterList[?Yield, ?Await] , FunctionRestParameter[?Yield, ?Await]
42 ---*/
43 throw "Test262: This statement should not be evaluated.";
44
45
46 (async (...a,) => {
47
48 });