mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-25 19:21:16 +07:00
13 lines
299 B
Java
13 lines
299 B
Java
// "Make 'mode' effectively final by moving initializer to the 'if' statement" "true-preview"
|
|
class Test {
|
|
void test(Object o) {
|
|
int mode = 2;
|
|
if (Math.random() > 0.5) {
|
|
mode = 3;
|
|
}
|
|
switch (o) {
|
|
case Integer i when i == mode<caret> -> {}
|
|
default -> {}
|
|
}
|
|
}
|
|
} |