mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-01 09:04:15 +07:00
IDEA-292909 GitOrigin-RevId: b8da95df3641add9c696b864ac624237f43a29e2
20 lines
430 B
Java
20 lines
430 B
Java
// "Replace with old style 'switch' statement" "true"
|
|
import java.util.*;
|
|
|
|
class SwitchExpressionMigration {
|
|
private static void m(int x) {
|
|
int/*1*/ x /*2*/= /*3*/switch<caret>/*4*/ (x +/*cond*/ x) {
|
|
case 1 -> {if (true)
|
|
yield /*5*/0;
|
|
else
|
|
yield 1;
|
|
}
|
|
case 2 -> 2;
|
|
case 3, 4 -> {
|
|
System.out.println("asda");
|
|
yield 3;
|
|
}
|
|
default -> 12/*6*/;
|
|
};
|
|
}
|
|
} |