Debian Codegraph @

js/src/tests/test262/language/block-scope/shadowing/parameter-name-shadowing-catch-parameter.js

raw
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 parameter name shadowing catch parameter
7 ---*/
8 function fn() {
9 var c = 1;
10 try {
11 throw 'stuff3';
12 } catch (c) {
13 (function(c) {
14 // parameter name shadowing catch parameter
15 c = 3;
16 assert.sameValue(c, 3);
17 })();
18 assert.sameValue(c, 'stuff3');
19 }
20 assert.sameValue(c, 1);
21 }
22 fn();
23
24
25 reportCompare(0, 0);