head-var-bound-names-dup.js (453B)
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: The head's declaration may contain duplicate entries 6 esid: sec-for-in-and-for-of-statements-static-semantics-early-errors 7 es6id: 13.7.5 8 ---*/ 9 10 var iterCount = 0; 11 12 for (var [x, x] of [[1, 2]]) { 13 assert.sameValue(x, 2); 14 iterCount += 1; 15 } 16 17 assert.sameValue(iterCount, 1); 18 19 reportCompare(0, 0);