mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
new inference:
reject inference if lower and equals bounds do not agree; -> inference variable should fill extends list types with it's upper bounds as they are correctly substituted with session's inference variables, otherwise incorporation up-up rule could get refs to initial type parameter instead of correct inference variable
This commit is contained in:
+1
-1
@@ -2,6 +2,6 @@ class A<T> {
|
||||
<T extends A<T>> void foo(T x){}
|
||||
|
||||
void bar(A<?> x){
|
||||
<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>;
|
||||
foo<error descr="'foo(T)' in 'A' cannot be applied to '(A<capture<?>>)'">(x)</error>;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user