Debian Codegraph @

js/src/tests/test262/language/statements/for-in/head-lhs-cover.js

raw
1 // Copyright (C) 2016 the V8 project authors. All rights reserved.
2 // This code is governed by the BSD license found in the LICENSE file.
3
4 /*---
5 description: >
6 Head's AssignmentExpression may be CoverParenthesizedExpressionAndArrowParameterList
7 esid: sec-for-in-and-for-of-statements-static-semantics-early-errors
8 es6id: 13.7.5
9 ---*/
10
11 var iterCount = 0;
12 var x;
13
14 for ((x) in { attr: null }) {
15 assert.sameValue(x, 'attr');
16 iterCount += 1;
17 }
18
19 assert.sameValue(iterCount, 1);
20
21 reportCompare(0, 0);