Java to Kotlin converter: better switch conversion in case of code block in case

This commit is contained in:
Valentin Kipyatkov
2014-07-07 20:02:32 +04:00
parent 3ccd8839ff
commit 8d290ee127
4 changed files with 66 additions and 6 deletions
@@ -0,0 +1,20 @@
//method
void foo() {
switch(a) {
case 1: {
int x = 1;
System.out.println(x);
break;
}
case 2: {
int x = 2;
System.out.println(x);
}
break;
case 3: {
System.out.println(3);
}
}
}