nameless-dflt-params-rest.js (933B)
1 // |reftest| error:SyntaxError 2 // This file was procedurally generated from the following sources: 3 // - src/function-forms/dflt-params-rest.case 4 // - src/function-forms/syntax/async-func-expr-nameless.template 5 /*--- 6 description: RestParameter does not support an initializer (async function nameless expression) 7 esid: sec-async-function-definitions 8 features: [default-parameters, async-functions] 9 flags: [generated] 10 negative: 11 phase: parse 12 type: SyntaxError 13 info: | 14 14.6 Async Function Definitions 15 16 AsyncFunctionExpression : 17 async function ( FormalParameters ) { AsyncFunctionBody } 18 19 20 14.1 Function Definitions 21 22 Syntax 23 24 FunctionRestParameter[Yield] : 25 26 BindingRestElement[?Yield] 27 28 13.3.3 Destructuring Binding Patterns 29 30 Syntax 31 32 BindingRestElement[Yield] : 33 34 ...BindingIdentifier[?Yield] 35 ...BindingPattern[?Yield] 36 37 ---*/ 38 $DONOTEVALUATE(); 39 40 41 (async function(...x = []) { 42 43 });