56 lines
849 B
Text
56 lines
849 B
Text
=== 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 : number
|
|
|
|
use("1");
|
|
>use("1") : any
|
|
>use : (a: string) => any
|
|
>"1" : string
|
|
|
|
break;
|
|
case 2:
|
|
>2 : number
|
|
|
|
use("2");
|
|
>use("2") : any
|
|
>use : (a: string) => any
|
|
>"2" : string
|
|
}
|
|
}
|
|
|
|
|
|
function foo2(a: number) {
|
|
>foo2 : (a: number) => void
|
|
>a : number
|
|
|
|
switch (a) {
|
|
>a : number
|
|
|
|
case 1:
|
|
>1 : number
|
|
|
|
use("1");
|
|
>use("1") : any
|
|
>use : (a: string) => any
|
|
>"1" : string
|
|
|
|
break;
|
|
default:
|
|
use("2");
|
|
>use("2") : any
|
|
>use : (a: string) => any
|
|
>"2" : string
|
|
}
|
|
}
|