mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-30 14:30:49 +07:00
GitOrigin-RevId: f445a9bd4e2abcf4c0e1e923d27823e8965e21f6
13 lines
274 B
Java
13 lines
274 B
Java
// "Replace with 'switch' expression" "true-preview"
|
|
import org.jetbrains.annotations.Nullable;
|
|
|
|
class X {
|
|
|
|
int test4(int x) {
|
|
return switch (x) {
|
|
case 1 -> 2;
|
|
case 2 -> 4;
|
|
default -> throw new IllegalArgumentException();
|
|
};
|
|
}
|
|
} |