ExpressionTypeMemoryState:isSuperStateOf to check additional field

Fixes IDEA-183267 Completion based on instanceof is gone
This commit is contained in:
Tagir Valeev
2017-12-06 17:19:53 +07:00
parent e92d1c1daf
commit af2f419e5f
4 changed files with 54 additions and 0 deletions
@@ -0,0 +1,17 @@
import java.math.BigInteger;
import java.util.function.Function;
class Test {
private static boolean instanceOfAfterFunction(Integer lambda,
Function<Integer, Number> replacer, Object type) {
Number function = replacer.apply(lambda);
if (function instanceof BigInteger && ((BigInteger)function).bitCount() > 0) {
return false;
}
if (type instanceof String && ((String) type).substring()) {
return false;
}
return true;
}
}