/
githubmirror
/
panama-vector
Обзор
Документация
Войти
/
githubmirror
/
panama-vector
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
test/langtools/tools/javac/lambda/MethodReference58.java
23 строки
518 B
Guoxiong Li
8258525: Some existing tests should use /nodynamiccopyright/ instead of the standard header
30 дек 2020, 20:20
30 дек 2020, 20:20
8435f0d
Код
Авторство
О чём код?
/* * @test /nodynamiccopyright/ * @bug 8004102 8078024 * @summary Add support for generic functional descriptors * @compile/fail/ref=MethodReference58.out -XDrawDiagnostics MethodReference58.java */ class MethodReference58 { interface F_Object { <X> void m(X x); } interface F_Integer { <X extends Integer> void m(X x); } void test() { F_Object f1 = this::g; //incompatible bounds F_Integer f2 = this::g; //ok } <Z extends Number> void g(Z z) { } }