new inference: do not instantiate vars with upper bounds mix when incomplete substitutor is supposed

(cherry picked from commit ff73c519f10ec947b86832a0c4ce5d6ee9b9e4c3)
This commit is contained in:
anna
2013-11-20 16:33:41 +01:00
parent 80e8321a48
commit 3188589850
3 changed files with 41 additions and 6 deletions

View File

@@ -0,0 +1,21 @@
import java.util.*;
class Test {
interface I<T> {
T foo();
}
class Inner<T> { }
<M1 extends List<?>> Inner<M1> staticFactory() {
return null;
}
<M2 extends List<?>> void foo(I<M2> coll,
Inner<M2> assertion) { }
void test(I<List<List<Integer>>> coll) {
foo(coll, staticFactory());
}
}