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