Debian Codegraph @

js/src/tests/test262/language/block-scope/shadowing/let-declarations-shadowing-parameter-name-let-const-and-var.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 let declarations shadowing parameter name, let, const and var
7 ---*/
8 function fn(a) {
9 let b = 1;
10 var c = 1;
11 const d = 1;
12 {
13 let a = 2;
14 let b = 2;
15 let c = 2;
16 let d = 2;
17 assert.sameValue(a, 2);
18 assert.sameValue(b, 2);
19 assert.sameValue(c, 2);
20 assert.sameValue(d, 2);
21 }
22 }
23 fn(1);
24
25
26 reportCompare(0, 0);