Debian Codegraph @

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