42 lines
563 B
Text
42 lines
563 B
Text
=== tests/cases/compiler/switchFallThroughs.ts ===
|
|
function R1(index: number) {
|
|
>R1 : (index: number) => string
|
|
>index : number
|
|
|
|
switch (index) {
|
|
>index : number
|
|
|
|
case 0:
|
|
>0 : number
|
|
|
|
case 1:
|
|
>1 : number
|
|
|
|
case 2:
|
|
>2 : number
|
|
|
|
var a = 'a';
|
|
>a : string
|
|
>'a' : string
|
|
|
|
return a;
|
|
>a : string
|
|
|
|
case 3:
|
|
>3 : number
|
|
|
|
case 4: {
|
|
>4 : number
|
|
|
|
return 'b';
|
|
>'b' : string
|
|
}
|
|
case 5:
|
|
>5 : number
|
|
|
|
default:
|
|
return 'c';
|
|
>'c' : string
|
|
}
|
|
}
|
|
|