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:
Anna Kozlova
2015-02-19 18:07:54 +01:00
parent abdd8b2d52
commit 7bdb789b45
7 changed files with 65 additions and 51 deletions
@@ -142,7 +142,7 @@ class S1 {
}
void bar(List<? extends S1> k) {
f<error descr="'f(java.util.List<java.lang.Object>, java.lang.Object)' in 'S1' cannot be applied to '(java.util.List<capture<? extends S1>>, S1)'">(k, k.get(0))</error>;
f<error descr="'f(java.util.List<T>, T)' in 'S1' cannot be applied to '(java.util.List<capture<? extends S1>>, S1)'">(k, k.get(0))</error>;
}
}