mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-04-14 10:31:23 +07:00
Fixes IDEA-374601 Copy 'x' to effectively final variable breaks code when type is non-denotable GitOrigin-RevId: 3b2d15f24b182ac3948ae3b5066c5e68c1c0bf5c
17 lines
302 B
Java
17 lines
302 B
Java
// "Copy 'x' to effectively final temp variable" "true-preview"
|
|
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();
|
|
};
|
|
}
|
|
} |