Debian Codegraph @

js/src/tests/test262/language/expressions/object/method-definition/async-meth-rest-params-trailing-comma-early-error.js

raw
1 // |reftest| error:SyntaxError
2 // This file was procedurally generated from the following sources:
3 // - src/function-forms/rest-params-trailing-comma-early-error.case
4 // - src/function-forms/syntax/async-meth.template
5 /*---
6 description: It's a syntax error if a FunctionRestParameter is followed by a trailing comma (async method)
7 esid: sec-async-function-definitions
8 features: [async-iteration]
9 flags: [generated]
10 negative:
11 phase: parse
12 type: SyntaxError
13 info: |
14 14.6 Async Function Definitions
15
16 AsyncMethod :
17 async PropertyName ( UniqueFormalParameters ) { AsyncFunctionBody }
18
19
20 Trailing comma in the parameters list
21
22 14.1 Function Definitions
23
24 FormalParameters[Yield, Await] :
25 [empty]
26 FunctionRestParameter[?Yield, ?Await]
27 FormalParameterList[?Yield, ?Await]
28 FormalParameterList[?Yield, ?Await] ,
29 FormalParameterList[?Yield, ?Await] , FunctionRestParameter[?Yield, ?Await]
30 ---*/
31 $DONOTEVALUATE();
32
33
34 ({
35 async *method(...a,) {
36
37 }
38 });