tor-browser

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

12.10-0-11.js (446B)


      1 // Copyright (c) 2012 Ecma International.  All rights reserved.
      2 // This code is governed by the BSD license found in the LICENSE file.
      3 
      4 /*---
      5 es5id: 12.10-0-11
      6 description: with introduces scope - name lookup finds inner variable
      7 flags: [noStrict]
      8 ---*/
      9 
     10  function f(o) {
     11 
     12    function innerf(o) {
     13      var x = 42;
     14 
     15      with (o) {
     16        return x;
     17      }
     18    }
     19 
     20    return innerf(o);
     21  }
     22 
     23 assert.sameValue(f({}), 42);
     24 
     25 reportCompare(0, 0);