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
|
//// [tests/cases/compiler/shadowedFunctionScopedVariablesByBlockScopedOnes.ts] ////
=== shadowedFunctionScopedVariablesByBlockScopedOnes.ts ===
// https://github.com/microsoft/TypeScript/issues/2185
function test1() {
>test1 : () => void
for (let v; ; ) { var v; }
>v : any
>v : any
}
function test2() {
>test2 : () => void
for (let v in []) { var v; }
>v : string
>[] : undefined[]
>v : any
}
function test3() {
>test3 : () => void
for (let v of []) { var v; }
>v : any
>[] : undefined[]
>v : any
}
function test4() {
>test4 : () => void
{
let x;
>x : any
{
var x;
>x : any
}
}
}
function test5() {
>test5 : () => void
{
{
var x;
>x : any
}
let x;
>x : any
}
}
|