mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-17 07:20:53 +07:00
16 lines
341 B
Java
16 lines
341 B
Java
// "Make 'x' effectively final by moving initializer to the 'if' statement" "true-preview"
|
|
class X {
|
|
void test(boolean a, boolean b, boolean c) {
|
|
int x = 0;
|
|
if (a) {
|
|
if (b) {
|
|
x = 1;
|
|
} else {
|
|
x = 2;
|
|
}
|
|
} else if (c) {
|
|
x = 3;
|
|
}
|
|
Runnable r = () -> System.out.println(<caret>x);
|
|
}
|
|
} |