obj-ptrn-list-err.js (1122B)
1 // This file was procedurally generated from the following sources: 2 // - src/dstr-binding/obj-ptrn-list-err.case 3 // - src/dstr-binding/error/try.template 4 /*--- 5 description: Binding property list evaluation is interrupted by an abrupt completion (try statement) 6 esid: sec-runtime-semantics-catchclauseevaluation 7 features: [destructuring-binding] 8 flags: [generated] 9 info: | 10 Catch : catch ( CatchParameter ) Block 11 12 [...] 13 5. Let status be the result of performing BindingInitialization for 14 CatchParameter passing thrownValue and catchEnv as arguments. 15 [...] 16 17 13.3.3.5 Runtime Semantics: BindingInitialization 18 19 BindingPropertyList : BindingPropertyList , BindingProperty 20 21 1. Let status be the result of performing BindingInitialization for 22 BindingPropertyList using value and environment as arguments. 23 2. ReturnIfAbrupt(status). 24 ---*/ 25 var initCount = 0; 26 function thrower() { 27 throw new Test262Error(); 28 } 29 30 assert.throws(Test262Error, function() { 31 try { 32 throw {}; 33 } catch ({ a, b = thrower(), c = ++initCount }) {} 34 }); 35 36 assert.sameValue(initCount, 0); 37 38 reportCompare(0, 0);