Debian Codegraph @

framework/tests/all-systems/java8inference/Bug5.java

raw
1 package inference.guava;
2
3 import java.util.Map.Entry;
4 import java.util.function.Predicate;
5
6 @SuppressWarnings("") // Just check for crashes.
7 public class Bug5<K, V> {
8
9 boolean apply(Object key, V value, MyPredicate<? super Entry<K, V>> predicate) {
10 @SuppressWarnings("unchecked")
11 K k = (K) key;
12 return predicate.apply(immutableEntry(k, value));
13 }
14
15 public static <K, V> Entry<K, V> immutableEntry(K key, V value) {
16 throw new RuntimeException();
17 }
18
19 public interface MyPredicate<T> extends Predicate<T> {
20 boolean apply(T input);
21 }
22 }