Files
openide/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/makeVarEffectivelyFinal/beforeIfElseChain.java
2022-09-09 15:06:38 +00:00

15 lines
361 B
Java

// "Make variable effectively final" "true-preview"
class X {
void test(boolean a, boolean b, boolean c) {
int x = 0;
if (a) {
System.out.println("hello");
x = 1;
} else if (b) {
System.out.println("hello2");
} else if (c) {
System.out.println("hello3");
}
Runnable r = () -> System.out.println(<caret>x);
}
}