Debian Codegraph @

js/src/tests/test262/language/statements/async-function/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-func-decl.template
5 /*---
6 description: It's a syntax error if a FunctionRestParameter is followed by a trailing comma (async function declaration)
7 esid: sec-async-function-definitions
8 features: [async-functions]
9 flags: [generated]
10 negative:
11 phase: parse
12 type: SyntaxError
13 info: |
14 14.6 Async Function Definitions
15
16 AsyncFunctionDeclaration :
17 async function BindingIdentifier ( FormalParameters ) { 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 async function f(...a,) {
35
36 }