mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-31 17:45:48 +07:00
- fix case, when `default` is not last GitOrigin-RevId: 93d12d7a0d4a929c58630a4a6f1f5b2c9a10d039
14 lines
281 B
Java
14 lines
281 B
Java
// "Replace with 'switch' expression" "true-preview"
|
|
|
|
class X {
|
|
enum State {
|
|
CANCELLED, INTERRUPTING, NORMAL
|
|
}
|
|
|
|
String test(State state, String outcome) {
|
|
return switch (state) {
|
|
default -> "1";
|
|
case CANCELLED, INTERRUPTED -> "2";
|
|
};
|
|
}
|
|
} |