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,17 @@
fun foo() {
when (a) {
1 -> {
val x = 1
System.out.println(x)
}
2 -> {
val x = 2
System.out.println(x)
}
3 -> {
System.out.println(3)
}
}
}