ary-ptrn-elem-obj-val-undef.js (1246B)
1 // This file was procedurally generated from the following sources: 2 // - src/dstr-binding/ary-ptrn-elem-obj-val-undef.case 3 // - src/dstr-binding/error/try.template 4 /*--- 5 description: Nested object destructuring with a value of `undefined` (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.6 Runtime Semantics: IteratorBindingInitialization 18 19 BindingElement : BindingPattern Initializeropt 20 21 1. If iteratorRecord.[[done]] is false, then 22 [...] 23 e. Else 24 i. Let v be IteratorValue(next). 25 [...] 26 4. Return the result of performing BindingInitialization of BindingPattern 27 with v and environment as the arguments. 28 29 13.3.3.5 Runtime Semantics: BindingInitialization 30 31 BindingPattern : ObjectBindingPattern 32 33 1. Let valid be RequireObjectCoercible(value). 34 2. ReturnIfAbrupt(valid). 35 ---*/ 36 37 assert.throws(TypeError, function() { 38 try { 39 throw []; 40 } catch ([{ x }]) {} 41 }); 42 43 reportCompare(0, 0);