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