Java to Kotlin converter: better switch conversion in case of code block in case
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user