ary-ptrn-rest-init-ary.js (1066B)
1 // |reftest| error:SyntaxError 2 // This file was procedurally generated from the following sources: 3 // - src/dstr-binding/ary-ptrn-rest-init-ary.case 4 // - src/dstr-binding/default/try.template 5 /*--- 6 description: Rest element (nested array pattern) does not support initializer (try statement) 7 esid: sec-runtime-semantics-catchclauseevaluation 8 features: [destructuring-binding] 9 flags: [generated] 10 negative: 11 phase: parse 12 type: SyntaxError 13 info: | 14 Catch : catch ( CatchParameter ) Block 15 16 [...] 17 5. Let status be the result of performing BindingInitialization for 18 CatchParameter passing thrownValue and catchEnv as arguments. 19 [...] 20 21 13.3.3 Destructuring Binding Patterns 22 ArrayBindingPattern[Yield] : 23 [ Elisionopt BindingRestElement[?Yield]opt ] 24 [ BindingElementList[?Yield] ] 25 [ BindingElementList[?Yield] , Elisionopt BindingRestElement[?Yield]opt ] 26 ---*/ 27 $DONOTEVALUATE(); 28 29 var ranCatch = false; 30 31 try { 32 throw []; 33 } catch ([...[ x ] = []]) { 34 35 ranCatch = true; 36 } 37 38 assert(ranCatch, 'executed `catch` block');