mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-25 14:25:04 +07:00
new inference: captures should stay closed inside nested calls
This commit is contained in:
+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>>, 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>>, capture<? extends S1>)'">(k, k.get(0))</error>;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
class Test {
|
||||
|
||||
class Foo<K> {}
|
||||
|
||||
void test(Foo<? extends String> p) {
|
||||
foo(bar(p)) ;
|
||||
}
|
||||
|
||||
<T> T bar(Foo<T> p) {
|
||||
return null;
|
||||
}
|
||||
|
||||
<K> K foo(K p) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user