2014-07-13 01:04:16 +02:00
|
|
|
//// [switchFallThroughs.ts]
|
|
|
|
function R1(index: number) {
|
|
|
|
switch (index) {
|
|
|
|
case 0:
|
|
|
|
case 1:
|
|
|
|
case 2:
|
|
|
|
var a = 'a';
|
|
|
|
return a;
|
|
|
|
case 3:
|
|
|
|
case 4: {
|
|
|
|
return 'b';
|
|
|
|
}
|
|
|
|
case 5:
|
|
|
|
default:
|
|
|
|
return 'c';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//// [switchFallThroughs.js]
|
|
|
|
function R1(index) {
|
|
|
|
switch (index) {
|
|
|
|
case 0:
|
|
|
|
case 1:
|
|
|
|
case 2:
|
|
|
|
var a = 'a';
|
|
|
|
return a;
|
|
|
|
case 3:
|
2014-11-04 02:15:14 +01:00
|
|
|
case 4: {
|
|
|
|
return 'b';
|
|
|
|
}
|
2014-07-13 01:04:16 +02:00
|
|
|
case 5:
|
|
|
|
default:
|
|
|
|
return 'c';
|
|
|
|
}
|
|
|
|
}
|