File: controlFlowFinallyNoCatchAssignments.symbols

package info (click to toggle)
node-typescript 3.3.3333-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 324,548 kB
  • sloc: makefile: 6; sh: 3
file content (38 lines) | stat: -rw-r--r-- 1,386 bytes parent folder | download | duplicates (5)
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
=== tests/cases/compiler/controlFlowFinallyNoCatchAssignments.ts ===
let x: number;
>x : Symbol(x, Decl(controlFlowFinallyNoCatchAssignments.ts, 0, 3))

x = Math.random();
>x : Symbol(x, Decl(controlFlowFinallyNoCatchAssignments.ts, 0, 3))
>Math.random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --))
>Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
>random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --))

let a: number;
>a : Symbol(a, Decl(controlFlowFinallyNoCatchAssignments.ts, 2, 3))

try {
    if (x) {
>x : Symbol(x, Decl(controlFlowFinallyNoCatchAssignments.ts, 0, 3))

        a = 1;
>a : Symbol(a, Decl(controlFlowFinallyNoCatchAssignments.ts, 2, 3))

    } else {
        a = 2;
>a : Symbol(a, Decl(controlFlowFinallyNoCatchAssignments.ts, 2, 3))
    }
} finally {
    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(controlFlowFinallyNoCatchAssignments.ts, 0, 3))
}

console.log(a); // <- error here
>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, --, --))
>a : Symbol(a, Decl(controlFlowFinallyNoCatchAssignments.ts, 2, 3))