mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
44 lines
1.1 KiB
Plaintext
44 lines
1.1 KiB
Plaintext
//// [tests/cases/compiler/fallFromLastCase1.ts] ////
|
|
|
|
=== fallFromLastCase1.ts ===
|
|
declare function use(a: string);
|
|
>use : Symbol(use, Decl(fallFromLastCase1.ts, 0, 0))
|
|
>a : Symbol(a, Decl(fallFromLastCase1.ts, 0, 21))
|
|
|
|
function foo1(a: number) {
|
|
>foo1 : Symbol(foo1, Decl(fallFromLastCase1.ts, 0, 32))
|
|
>a : Symbol(a, Decl(fallFromLastCase1.ts, 2, 14))
|
|
|
|
switch (a) {
|
|
>a : Symbol(a, Decl(fallFromLastCase1.ts, 2, 14))
|
|
|
|
case 1:
|
|
use("1");
|
|
>use : Symbol(use, Decl(fallFromLastCase1.ts, 0, 0))
|
|
|
|
break;
|
|
case 2:
|
|
use("2");
|
|
>use : Symbol(use, Decl(fallFromLastCase1.ts, 0, 0))
|
|
}
|
|
}
|
|
|
|
|
|
function foo2(a: number) {
|
|
>foo2 : Symbol(foo2, Decl(fallFromLastCase1.ts, 10, 1))
|
|
>a : Symbol(a, Decl(fallFromLastCase1.ts, 13, 14))
|
|
|
|
switch (a) {
|
|
>a : Symbol(a, Decl(fallFromLastCase1.ts, 13, 14))
|
|
|
|
case 1:
|
|
use("1");
|
|
>use : Symbol(use, Decl(fallFromLastCase1.ts, 0, 0))
|
|
|
|
break;
|
|
default:
|
|
use("2");
|
|
>use : Symbol(use, Decl(fallFromLastCase1.ts, 0, 0))
|
|
}
|
|
}
|