mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-08 23:39:39 +07:00
new inference: lift type params from referenced method
(cherry picked from commit 057bd4d4d576711b77141b64987079ef8d59a583)
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
import java.util.List;
|
||||
|
||||
class Test {
|
||||
|
||||
interface Function<K, V> {
|
||||
V _(K k);
|
||||
}
|
||||
|
||||
static {
|
||||
foo(Test::asList);
|
||||
}
|
||||
|
||||
public static <T> List<T> asList(T... a) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static <C> void foo(Function<String, C> fn) { }
|
||||
}
|
||||
Reference in New Issue
Block a user