Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/language/expressions/object/method-definition/async-meth-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-meth.template
4 /*---
5 description: It's a syntax error if a FunctionRestParameter is followed by a trailing comma (async method)
6 esid: sec-async-function-definitions
7 features: [async-iteration]
8 flags: [generated]
9 negative:
10 phase: parse
11 type: SyntaxError
12 info: |
13 14.6 Async Function Definitions
14
15 AsyncMethod :
16 async PropertyName ( UniqueFormalParameters ) { AsyncFunctionBody }
17
18
19 Trailing comma in the parameters list
20
21 14.1 Function Definitions
22
23 FormalParameters[Yield, Await] :
24 [empty]
25 FunctionRestParameter[?Yield, ?Await]
26 FormalParameterList[?Yield, ?Await]
27 FormalParameterList[?Yield, ?Await] ,
28 FormalParameterList[?Yield, ?Await] , FunctionRestParameter[?Yield, ?Await]
29 ---*/
30 throw "Test262: This statement should not be evaluated.";
31
32
33 ({
34 async *method(...a,) {
35
36 }
37 });