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
|
=== tests/cases/compiler/fallFromLastCase2.ts ===
declare function use(a: string);
>use : Symbol(use, Decl(fallFromLastCase2.ts, 0, 0))
>a : Symbol(a, Decl(fallFromLastCase2.ts, 0, 21))
function foo1(a: number) {
>foo1 : Symbol(foo1, Decl(fallFromLastCase2.ts, 0, 32))
>a : Symbol(a, Decl(fallFromLastCase2.ts, 2, 14))
switch (a) {
>a : Symbol(a, Decl(fallFromLastCase2.ts, 2, 14))
case 1:
use("1");
>use : Symbol(use, Decl(fallFromLastCase2.ts, 0, 0))
break;
case 2:
use("2");
>use : Symbol(use, Decl(fallFromLastCase2.ts, 0, 0))
case 3:
use("3");
>use : Symbol(use, Decl(fallFromLastCase2.ts, 0, 0))
}
}
function foo2(a: number) {
>foo2 : Symbol(foo2, Decl(fallFromLastCase2.ts, 12, 1))
>a : Symbol(a, Decl(fallFromLastCase2.ts, 15, 14))
switch (a) {
>a : Symbol(a, Decl(fallFromLastCase2.ts, 15, 14))
case 1:
use("1");
>use : Symbol(use, Decl(fallFromLastCase2.ts, 0, 0))
break;
default:
use("2");
>use : Symbol(use, Decl(fallFromLastCase2.ts, 0, 0))
case 2:
use("3");
>use : Symbol(use, Decl(fallFromLastCase2.ts, 0, 0))
}
}
|