57 lines
822 B
Plaintext
57 lines
822 B
Plaintext
=== tests/cases/compiler/fallFromLastCase1.ts ===
|
|
|
|
declare function use(a: string);
|
|
>use : (a: string) => any
|
|
>a : string
|
|
|
|
function foo1(a: number) {
|
|
>foo1 : (a: number) => void
|
|
>a : number
|
|
|
|
switch (a) {
|
|
>a : number
|
|
|
|
case 1:
|
|
>1 : 1
|
|
|
|
use("1");
|
|
>use("1") : any
|
|
>use : (a: string) => any
|
|
>"1" : "1"
|
|
|
|
break;
|
|
case 2:
|
|
>2 : 2
|
|
|
|
use("2");
|
|
>use("2") : any
|
|
>use : (a: string) => any
|
|
>"2" : "2"
|
|
}
|
|
}
|
|
|
|
|
|
function foo2(a: number) {
|
|
>foo2 : (a: number) => void
|
|
>a : number
|
|
|
|
switch (a) {
|
|
>a : number
|
|
|
|
case 1:
|
|
>1 : 1
|
|
|
|
use("1");
|
|
>use("1") : any
|
|
>use : (a: string) => any
|
|
>"1" : "1"
|
|
|
|
break;
|
|
default:
|
|
use("2");
|
|
>use("2") : any
|
|
>use : (a: string) => any
|
|
>"2" : "2"
|
|
}
|
|
}
|