tor-browser

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

catch-parameter-shadowing-catch-parameter.js (578B)


      1 // Copyright (C) 2011 the V8 project authors. All rights reserved.
      2 // This code is governed by the BSD license found in the LICENSE file.
      3 /*---
      4 es6id: 13.1
      5 description: >
      6    catch parameter shadowing catch parameter
      7 ---*/
      8 function fn() {
      9  var c = 1;
     10  try {
     11    throw 'stuff3';
     12  } catch (c) {
     13    try {
     14      throw 'stuff4';
     15    } catch(c) {
     16      assert.sameValue(c,'stuff4');
     17      // catch parameter shadowing catch parameter
     18      c = 3;
     19      assert.sameValue(c, 3);
     20    }
     21    assert.sameValue(c, 'stuff3');
     22  }
     23  assert.sameValue(c, 1);
     24 }
     25 fn(1);
     26 
     27 
     28 reportCompare(0, 0);