tor-browser

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

12.14-4.js (789B)


      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 info: |
      6    local vars must not be visible outside with block
      7    local functions must not be visible outside with block
      8    local function expresssions should not be visible outside with block
      9    local vars must shadow outer vars
     10    local functions must shadow outer functions
     11    local function expresssions must shadow outer function expressions
     12    eval should use the appended object to the scope chain
     13 es5id: 12.14-4
     14 description: catch introduces scope - block-local vars must shadow outer vars
     15 ---*/
     16 
     17  var o = { foo : 42};
     18 
     19  try {
     20    throw o;
     21  }
     22  catch (e) {
     23    var foo;
     24  }
     25 
     26 assert.sameValue(foo, undefined);
     27 
     28 reportCompare(0, 0);