mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-02-05 08:06:56 +07:00
18 lines
355 B
Java
18 lines
355 B
Java
// "Replace with 'switch' expression" "true"
|
|
|
|
class X {
|
|
void test(I i) {
|
|
int d = 5;
|
|
<caret>switch (i) {
|
|
case C1 c1:
|
|
d = 3;
|
|
break;
|
|
case C2 c2:
|
|
d = 2;
|
|
}
|
|
}
|
|
|
|
sealed interface I {}
|
|
final class C1 implements I {}
|
|
final class C2 implements I {}
|
|
} |