mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-04 17:20:55 +07:00
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:
@@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user