mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-26 00:11:26 +07:00
method refs: propagate substitutor from method reference resolve to upper level inference (IDEA-91988)
This commit is contained in:
+21
@@ -0,0 +1,21 @@
|
||||
class Test {
|
||||
static <U> Iterable<U> map(Mapper<? super String, ? extends U> mapper) {
|
||||
return null;
|
||||
}
|
||||
|
||||
static void test() {
|
||||
Integer next = map(String::length).iterator().next();
|
||||
Integer next1 = map(Test::length).iterator().next();
|
||||
}
|
||||
|
||||
public static <T> T length(T s) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static <T> int length(String s) {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
interface Mapper<T, U> {
|
||||
U map(T t);
|
||||
}
|
||||
Reference in New Issue
Block a user