keith_miller@apple.com | bcc77f2 | 2016-07-15 06:03:25 +0000 | [diff] [blame] | 1 | // This file was procedurally generated from the following sources: |
| 2 | // - src/dstr-binding/obj-ptrn-prop-eval-err.case |
| 3 | // - src/dstr-binding/error/for-var.template |
| 4 | /*--- |
| 5 | description: Evaluation of property name returns an abrupt completion (for statement) |
| 6 | esid: sec-for-statement-runtime-semantics-labelledevaluation |
| 7 | es6id: 13.7.4.7 |
| 8 | features: [destructuring-binding] |
| 9 | flags: [generated] |
| 10 | info: | |
| 11 | IterationStatement : |
| 12 | for ( var VariableDeclarationList ; Expressionopt ; Expressionopt ) Statement |
| 13 | |
| 14 | 1. Let varDcl be the result of evaluating VariableDeclarationList. |
| 15 | [...] |
| 16 | |
| 17 | 13.3.2.4 Runtime Semantics: Evaluation |
| 18 | |
| 19 | VariableDeclarationList : VariableDeclarationList , VariableDeclaration |
| 20 | |
| 21 | 1. Let next be the result of evaluating VariableDeclarationList. |
| 22 | 2. ReturnIfAbrupt(next). |
| 23 | 3. Return the result of evaluating VariableDeclaration. |
| 24 | |
| 25 | VariableDeclaration : BindingPattern Initializer |
| 26 | |
| 27 | 1. Let rhs be the result of evaluating Initializer. |
| 28 | 2. Let rval be GetValue(rhs). |
| 29 | 3. ReturnIfAbrupt(rval). |
| 30 | 4. Return the result of performing BindingInitialization for BindingPattern |
| 31 | passing rval and undefined as arguments. |
| 32 | |
| 33 | 13.3.3.5 Runtime Semantics: BindingInitialization |
| 34 | |
| 35 | BindingProperty : PropertyName : BindingElement |
| 36 | |
| 37 | 1. Let P be the result of evaluating PropertyName |
| 38 | 2. ReturnIfAbrupt(P). |
| 39 | ---*/ |
| 40 | function thrower() { |
| 41 | throw new Test262Error(); |
| 42 | } |
| 43 | |
| 44 | assert.throws(Test262Error, function() { |
| 45 | for (var { [thrower()]: x } = {}; iterCount < 1; ) { |
| 46 | return; |
| 47 | } |
| 48 | }); |