tor-browser

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

12.14-3.js (876B)


      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-3
     14 description: >
     15    catch doesn't change declaration scope - var declaration are
     16    visible outside when name different from catch parameter
     17 ---*/
     18 
     19  try {
     20    throw new Error();
     21  }
     22  catch (e) {
     23    var foo = "declaration in catch";
     24  }
     25 
     26 assert.sameValue(foo, "declaration in catch");
     27 
     28 reportCompare(0, 0);