/
githubmirror
/
panama-vector
Обзор
Документация
Войти
/
githubmirror
/
panama-vector
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
test/langtools/tools/javac/lambda/MostSpecific21.java
20 строк
604 B
Erik Joelsson
8187443: Forest Consolidation: Move files to unified layout
12 сен 2017, 20:03
12 сен 2017, 20:03
3789983
Код
Авторство
О чём код?
/* * @test /nodynamiccopyright/ * @bug 8143852 * @summary Most specific inference constraints derived from both functional interface method parameters and tparam bounds * @compile/fail/ref=MostSpecific21.out -XDrawDiagnostics MostSpecific21.java */ class MostSpecific21 { interface F1<T> { <X extends T> Object apply(T arg); } interface F2 { <Y extends Number> String apply(Integer arg); } static <T> T m1(F1<T> f) { return null; } static Object m1(F2 f) { return null; } static String foo(Object in) { return "a"; } void test() { m1(MostSpecific21::foo); } }