This code:
class ExceptionInferenceBug {
interface PartialFunction<T, V> {
V apply(T paramT);
}
interface Function<T, V> extends PartialFunction<T, V> {
V apply(T paramT);
}
class O {}
static <T, V> void run(Function<? super O, V> function) {}
static <T, V> void run(PartialFunction<? super O, V> function) {}
public static void main(String[] args) {
run(t -> t.toString());
}
}
makes javac generate an assertion error. If the second run method is commented out there is no error.
reported in lambda-dev list: http://mail.openjdk.java.net/pipermail/lambda-dev/2014-February/011910.html