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