summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/language/block-scope/shadowing/catch-parameter-shadowing-function-parameter-name.js
blob: 30f54026faab64017d9754db1620652b6bfe5939 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// Copyright (C) 2011 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
es6id: 13.1
description: >
    catch parameter shadowing function parameter name
---*/
function fn(a) {
  try {
    throw 'stuff1';
  } catch (a) {
    assert.sameValue(a, 'stuff1');
    // catch parameter shadowing function parameter name
    a = 2;
    assert.sameValue(a, 2);
  }
}
fn(1);


reportCompare(0, 0);