async-meth-dflt-params-duplicates.js (1084B)
1 // |reftest| error:SyntaxError 2 // This file was procedurally generated from the following sources: 3 // - src/function-forms/dflt-params-duplicates.case 4 // - src/function-forms/syntax/async-meth.template 5 /*--- 6 description: It is a Syntax Error if BoundNames of FormalParameters contains any duplicate elements. (async method) 7 esid: sec-async-function-definitions 8 features: [default-parameters, 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 14.1.2 Static Semantics: Early Errors 21 22 StrictFormalParameters : FormalParameters 23 24 - It is a Syntax Error if BoundNames of FormalParameters contains any 25 duplicate elements. 26 27 FormalParameters : FormalParameterList 28 29 - It is a Syntax Error if IsSimpleParameterList of FormalParameterList is 30 false and BoundNames of FormalParameterList contains any duplicate 31 elements. 32 33 ---*/ 34 $DONOTEVALUATE(); 35 36 37 ({ 38 async *method(x = 0, x) { 39 40 } 41 });