mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-07 13:39:36 +07:00
union("is X, Y; not SubX", "is SubX, Y") now produces "is X, Y"; before it was "is Y".
Fixes IDEA-184153 Smart-cast completion fails
25 lines
483 B
Java
25 lines
483 B
Java
import java.math.BigInteger;
|
|
import java.util.function.Function;
|
|
|
|
class Test {
|
|
interface X {
|
|
void methodFromX();
|
|
void methodFromX2();
|
|
}
|
|
|
|
interface Y {
|
|
void methodFromY();
|
|
void methodFromY2();
|
|
}
|
|
|
|
interface Z extends X {}
|
|
|
|
void test(Object obj) {
|
|
if(obj instanceof Z && Math.random() > 0.5) {
|
|
return;
|
|
}
|
|
if(obj instanceof X && obj instanceof Y) {
|
|
obj.method<caret>
|
|
}
|
|
}
|
|
} |