Files
openide/java/java-tests/testData/codeInsight/completion/normal/InstanceOfAfterFunction.java
Tagir Valeev af2f419e5f ExpressionTypeMemoryState:isSuperStateOf to check additional field
Fixes IDEA-183267 Completion based on instanceof is gone
2017-12-06 17:19:53 +07:00

17 lines
545 B
Java

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 && type.subst<caret>) {
return false;
}
return true;
}
}