/
githubmirror
/
panama-vector
Обзор
Документация
Войти
/
githubmirror
/
panama-vector
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
test/langtools/tools/javac/lambda/MostSpecific19.java
20 строк
520 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 Test that generic function interface method bounds are the same * @compile/fail/ref=MostSpecific19.out -XDrawDiagnostics MostSpecific19.java */ class MostSpecific19 { interface F1 { <X extends Number> Object apply(X arg); } interface F2 { <Y extends Integer> String apply(Y arg); } static void m1(F1 f) {} static void m1(F2 f) {} static String foo(Object in) { return "a"; } void test() { m1(MostSpecific19::foo); } }