blob: 5a63f24b151e4fea47e5c492949972d04e55b96b [file] [log] [blame]
keith_miller@apple.combcc77f22016-07-15 06:03:25 +00001// 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/*---
5description: Evaluation of property name returns an abrupt completion (for statement)
6esid: sec-for-statement-runtime-semantics-labelledevaluation
7es6id: 13.7.4.7
8features: [destructuring-binding]
9flags: [generated]
10info: |
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---*/
40function thrower() {
41 throw new Test262Error();
42}
43
44assert.throws(Test262Error, function() {
45 for (var { [thrower()]: x } = {}; iterCount < 1; ) {
46 return;
47 }
48});