mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-28 04:37:32 +07:00
least upper bound: pull unbounded wildcard up so types Number & Comparable<? extends Number & Comparable<?>> are produced instead of Number & Comparable<? extends Comparable<?>>
inferred type in bounds check cleanup: accept that inference result is not within its bounds and give the inference the second chance
This commit is contained in:
+10
-1
@@ -14,4 +14,13 @@ abstract class A1<T>{
|
||||
void bar(A1<Long> x, A1<Integer> y){
|
||||
baz(foo(x, y));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
abstract class A3<T>{
|
||||
abstract <S> S foo(S x, S y);
|
||||
<S extends Number & Comparable<? extends K>, K extends Number & Comparable<? extends M>, M extends Number & Comparable<?>> void baz(A<S> a){}
|
||||
|
||||
void bar(A<Long> x, A<Integer> y){
|
||||
baz(foo(x, y));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user