IDEA-205881 Remove redundant cast leads to incompilable code

This commit is contained in:
Tagir Valeev
2019-03-22 10:44:54 +07:00
parent a1fbac8a0a
commit 1327600ef4
3 changed files with 24 additions and 1 deletions
@@ -0,0 +1,11 @@
import java.util.function.*;
import java.util.*;
class Y {
<T> List<T> filter(Collection<? extends T> collection,
Predicate<? super T> condition) {return null;}
boolean testString(String s) {return s.isEmpty();}
List<Object> test(List<String> input, boolean b) {
return b ? new ArrayList<>() : filter(input, o -> o instanceof String && testString((String)o));
}
}