Files
2022-10-06 15:55:11 +00:00

10 lines
238 B
Java

// "Make 'x' effectively final by moving initializer to the 'if' statement" "true-preview"
class X {
void test(boolean a, int y) {
int x = y;
if (a) {
x = 1;
}
Runnable r = () -> System.out.println(<caret>x);
}
}