|
| 1 | +=== tests/cases/compiler/controlFlowDestructuringVariablesInTryCatch.ts === |
| 2 | +declare function f1(): string; |
| 3 | +>f1 : Symbol(f1, Decl(controlFlowDestructuringVariablesInTryCatch.ts, 0, 0)) |
| 4 | + |
| 5 | +declare function f2(): [b: string]; |
| 6 | +>f2 : Symbol(f2, Decl(controlFlowDestructuringVariablesInTryCatch.ts, 0, 30)) |
| 7 | + |
| 8 | +declare function f3(): { c: string }; |
| 9 | +>f3 : Symbol(f3, Decl(controlFlowDestructuringVariablesInTryCatch.ts, 1, 35)) |
| 10 | +>c : Symbol(c, Decl(controlFlowDestructuringVariablesInTryCatch.ts, 2, 24)) |
| 11 | + |
| 12 | +try { |
| 13 | + var a = f1(); |
| 14 | +>a : Symbol(a, Decl(controlFlowDestructuringVariablesInTryCatch.ts, 5, 7)) |
| 15 | +>f1 : Symbol(f1, Decl(controlFlowDestructuringVariablesInTryCatch.ts, 0, 0)) |
| 16 | + |
| 17 | + var [b] = f2(); |
| 18 | +>b : Symbol(b, Decl(controlFlowDestructuringVariablesInTryCatch.ts, 6, 9)) |
| 19 | +>f2 : Symbol(f2, Decl(controlFlowDestructuringVariablesInTryCatch.ts, 0, 30)) |
| 20 | + |
| 21 | + var { c } = f3(); |
| 22 | +>c : Symbol(c, Decl(controlFlowDestructuringVariablesInTryCatch.ts, 7, 9)) |
| 23 | +>f3 : Symbol(f3, Decl(controlFlowDestructuringVariablesInTryCatch.ts, 1, 35)) |
| 24 | + |
| 25 | + var [d = 1] = []; |
| 26 | +>d : Symbol(d, Decl(controlFlowDestructuringVariablesInTryCatch.ts, 9, 9)) |
| 27 | + |
| 28 | + var { e = 1 } = { }; |
| 29 | +>e : Symbol(e, Decl(controlFlowDestructuringVariablesInTryCatch.ts, 10, 9)) |
| 30 | + |
| 31 | +} catch { |
| 32 | + console.error("error"); |
| 33 | +>console.error : Symbol(Console.error, Decl(lib.dom.d.ts, --, --)) |
| 34 | +>console : Symbol(console, Decl(lib.dom.d.ts, --, --)) |
| 35 | +>error : Symbol(Console.error, Decl(lib.dom.d.ts, --, --)) |
| 36 | +} |
| 37 | + |
| 38 | +a; |
| 39 | +>a : Symbol(a, Decl(controlFlowDestructuringVariablesInTryCatch.ts, 5, 7)) |
| 40 | + |
| 41 | +b; |
| 42 | +>b : Symbol(b, Decl(controlFlowDestructuringVariablesInTryCatch.ts, 6, 9)) |
| 43 | + |
| 44 | +c; |
| 45 | +>c : Symbol(c, Decl(controlFlowDestructuringVariablesInTryCatch.ts, 7, 9)) |
| 46 | + |
| 47 | +d; |
| 48 | +>d : Symbol(d, Decl(controlFlowDestructuringVariablesInTryCatch.ts, 9, 9)) |
| 49 | + |
| 50 | +e; |
| 51 | +>e : Symbol(e, Decl(controlFlowDestructuringVariablesInTryCatch.ts, 10, 9)) |
| 52 | + |
0 commit comments