1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
|
=== tests/cases/compiler/letConstInCaseClauses.ts ===
var x = 10;
>x : Symbol(x, Decl(letConstInCaseClauses.ts, 0, 3))
var y = 20;
>y : Symbol(y, Decl(letConstInCaseClauses.ts, 1, 3))
{
let x = 1;
>x : Symbol(x, Decl(letConstInCaseClauses.ts, 3, 7))
let y = 2;
>y : Symbol(y, Decl(letConstInCaseClauses.ts, 4, 7))
console.log(x)
>console.log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --))
>console : Symbol(console, Decl(lib.dom.d.ts, --, --))
>log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --))
>x : Symbol(x, Decl(letConstInCaseClauses.ts, 3, 7))
switch (x) {
>x : Symbol(x, Decl(letConstInCaseClauses.ts, 3, 7))
case 10:
let x = 20;
>x : Symbol(x, Decl(letConstInCaseClauses.ts, 8, 15))
}
switch (y) {
>y : Symbol(y, Decl(letConstInCaseClauses.ts, 4, 7))
case 10:
let y = 20;
>y : Symbol(y, Decl(letConstInCaseClauses.ts, 12, 15))
}
}
{
const x = 1;
>x : Symbol(x, Decl(letConstInCaseClauses.ts, 17, 9))
const y = 2;
>y : Symbol(y, Decl(letConstInCaseClauses.ts, 18, 9))
console.log(x)
>console.log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --))
>console : Symbol(console, Decl(lib.dom.d.ts, --, --))
>log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --))
>x : Symbol(x, Decl(letConstInCaseClauses.ts, 17, 9))
switch (x) {
>x : Symbol(x, Decl(letConstInCaseClauses.ts, 17, 9))
case 10:
const x = 20;
>x : Symbol(x, Decl(letConstInCaseClauses.ts, 22, 17))
}
switch (y) {
>y : Symbol(y, Decl(letConstInCaseClauses.ts, 18, 9))
case 10:
const y = 20;
>y : Symbol(y, Decl(letConstInCaseClauses.ts, 26, 17))
}
}
|