mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-26 15:27:45 +07:00
new inference: capture nested call case fixed (~Collections)
This commit is contained in:
+15
@@ -0,0 +1,15 @@
|
||||
import java.util.Iterator;
|
||||
|
||||
class Test<K, V> {
|
||||
|
||||
private final Iterator<? extends Foo<? extends K, ? extends V>> i = null;
|
||||
|
||||
public Foo<K, V> next() {
|
||||
return new Bar<>(i.next());
|
||||
}
|
||||
|
||||
interface Foo<T, K> {}
|
||||
private static class Bar<K, V> implements Foo<K, V> {
|
||||
Bar(Foo<? extends K, ? extends V> e) {}
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -142,7 +142,7 @@ class S1 {
|
||||
}
|
||||
|
||||
void bar(List<? extends S1> k) {
|
||||
f<error descr="'f(java.util.List<capture<? extends S1>>, capture<? extends S1>)' in 'S1' cannot be applied to '(java.util.List<capture<? extends S1>>, capture<? extends S1>)'">(k, k.get(0))</error>;
|
||||
f<error descr="'f(java.util.List<capture<? extends S1>>, capture<? extends S1>)' in 'S1' cannot be applied to '(java.util.List<capture<? extends S1>>, S1)'">(k, k.get(0))</error>;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user