| // Copyright (C) 2016 the V8 project authors. All rights reserved. |
| // This code is governed by the BSD license found in the LICENSE file. |
| description: Expression is allowed in head |
| IterationStatement : for ( ForDeclaration in Expression ) Statement |
| 1. Let keyResult be the result of performing |
| ForIn/OfHeadEvaluation(BoundNames of ForDeclaration, Expression, |
| 2. ReturnIfAbrupt(keyResult). |
| 3. Return ForIn/OfBodyEvaluation(ForDeclaration, Statement, keyResult, |
| lexicalBinding, labelSet). |
| for (x in null, { key: 0 }) { |
| assert.sameValue(x, 'key'); |
| assert.sameValue(iterCount, 1); |