mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-06 17:56:55 +07:00
GitOrigin-RevId: 2e79504ab44609427f51fe5652cb995ec72d17d6
20 lines
393 B
Java
20 lines
393 B
Java
// "Migrate to enhanced switch with rules" "true-preview"
|
|
import org.jetbrains.annotations.Nullable;
|
|
|
|
class X {
|
|
|
|
int test(int y) {
|
|
return swi<caret>tch (y) {
|
|
case 1:
|
|
System.out.println("1");
|
|
yield 1;
|
|
case 2:
|
|
yield 3;
|
|
case 3:
|
|
throw new IllegalArgumentException();
|
|
default:
|
|
System.out.println();
|
|
yield 5;
|
|
};
|
|
}
|
|
} |