mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-19 01:50:56 +07:00
java inference: allow unresolved type parameters during potential compatibility check (IDEA-268866)
GitOrigin-RevId: f38e13385d534b025f8072e29a3558b0f2ecf4e7
This commit is contained in:
committed by
intellij-monorepo-bot
parent
e2b495f4d2
commit
358f9086ce
@@ -54,4 +54,17 @@ class IDEA106973 {
|
||||
<error descr="Incompatible types. Found: '<method reference>', required: 'IDEA106973.Function<java.lang.String,java.lang.String[]>'">Function<String, String[]> a1 = String[] :: new;</error>
|
||||
Function<Short, String[]> a2 = String[] :: new;
|
||||
}
|
||||
}
|
||||
|
||||
class IDEA268866 {
|
||||
interface Function<A, B> {
|
||||
B apply(A a);
|
||||
}
|
||||
private static <T, K, U> void m(Function<? super T, ? extends K> keyMapper,
|
||||
Function<? super T, ? extends U> valueMapper) {
|
||||
}
|
||||
|
||||
private static void main(Function<Integer, Integer> identity) {
|
||||
m(identity, int[]::new);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user