mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-26 00:11:26 +07:00
new inference: accept unbounded wildcards
(cherry picked from commit ff37a13662a6d85d7890755130e6a696db00c4a6)
This commit is contained in:
+14
-1
@@ -12,7 +12,7 @@ class Test {
|
||||
zip(range1, range2, (f, s) -> asList(f, s));
|
||||
zip(range1, range2, Test::asList);
|
||||
|
||||
BiFunction<? super String, ? super String, ?> asList = Arrays::asList;
|
||||
BiFunction<? super String, ? super String, ?> asList = Test::asList;
|
||||
zip(range1, range2, asList);
|
||||
}
|
||||
|
||||
@@ -27,3 +27,16 @@ class Test {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
class Test1111 {
|
||||
interface I<R> {
|
||||
R apply();
|
||||
}
|
||||
|
||||
public void test(I<?> i) {
|
||||
bar<error descr="'bar(Test1111.I<? super java.lang.Object>)' in 'Test1111' cannot be applied to '(Test1111.I<capture<?>>)'">(i)</error>;
|
||||
}
|
||||
|
||||
public static <A> void bar(I<? super A> i) {}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user