mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-05-03 11:47:50 +07:00
Also: fix for var types Fixes IDEA-374029 "Make effectively final" generates uncompilable code GitOrigin-RevId: 17932aefe036dec167aabaf2066c4cdff11947da
17 lines
322 B
Java
17 lines
322 B
Java
// "Make 'x' effectively final by moving initializer to the 'if' statement" "false"
|
|
class Abc {
|
|
interface A{}
|
|
interface B{
|
|
void m();
|
|
}
|
|
|
|
void test(Object obj) {
|
|
var x = (A & B) obj;
|
|
if (Math.random() > 0.5) {
|
|
x = null;
|
|
}
|
|
Runnable r = () -> {
|
|
if (<caret>x != null) x.m();
|
|
};
|
|
}
|
|
} |