These examples:
Ex 1:
abstract class A2<T>{
abstract <S> S foo(S x, S y);
abstract <S1> void baz(A2<S1> a);
void bar(A2<Integer> y, A2<Long> x){
baz(foo(x, y));
}
}
Ex 2:
abstract class A<T>{
abstract <S> S foo(S x, S y);
<S extends Number & Comparable<? extends Number>> void baz(A<S> a){}
void bar(A<Long> x, A<Integer> y){
baz(foo(x, y));
}
}
Ex 3:
abstract class A1<T>{
abstract <S> S foo(S x, S y);
<T extends Number & Comparable<?>, S extends Number & Comparable<?
extends T>> void baz(A1<S> a){}
void bar(A1<Long> x, A1<Integer> y){
baz(foo(x, y));
}
}
compiles in 6 and 7 but fails to compile in 8.
reported by anna.kozlova_at_jetbrains.com in lambda-dev