blob: 858960fa76b326acacf0b570302c673a14053808 [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-id-get-value-err.case
3// - src/dstr-binding/error/for-var.template
4/*---
5description: Error thrown when accessing the corresponding property of the value object (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.7 Runtime Semantics: KeyedBindingInitialization
34
35 SingleNameBinding : BindingIdentifier Initializeropt
36
37 [...]
38 4. Let v be GetV(value, propertyName).
39 5. ReturnIfAbrupt(v).
40---*/
41var poisonedProperty = Object.defineProperty({}, 'poisoned', {
42 get: function() {
43 throw new Test262Error();
44 }
45});
46
47assert.throws(Test262Error, function() {
48 for (var { poisoned } = poisonedProperty; iterCount < 1; ) {
49 return;
50 }
51});