tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

head-var-bound-names-in-stmt.js (456B)


      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 description: The body may re-declare variables declared in the head
      5 esid: sec-for-in-and-for-of-statements-static-semantics-early-errors
      6 es6id: 13.7.5
      7 ---*/
      8 
      9 var iterCount = 0;
     10 
     11 for (var x of [99]) {
     12  var x;
     13 
     14  assert.sameValue(x, 99);
     15  iterCount += 1;
     16 }
     17 
     18 assert.sameValue(iterCount, 1);
     19 
     20 reportCompare(0, 0);