new inference: reject equals bounds contradicting lower bounds

This commit is contained in:
Anna Kozlova
2014-12-17 09:57:48 +01:00
parent f217ed47c4
commit 1ed0901d4b
6 changed files with 71 additions and 6 deletions
@@ -2,6 +2,6 @@ class A<T> {
<T extends A<T>> void foo(T x){}
void bar(A<?> x){
<error descr="Inferred type 'capture<?>' for type parameter 'T' is not within its bound; should extend 'A<capture<? extends A<capture<?>>>>'">foo(x)</error>;
<error descr="Inferred type 'java.lang.Object' for type parameter 'T' is not within its bound; should extend 'A<java.lang.Object>'">foo(x)</error>;
}
}