/
githubmirror
/
panama-vector
Обзор
Документация
Войти
/
githubmirror
/
panama-vector
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
test/langtools/tools/javac/lambda/MethodReference68.java
23 строки
578 B
Erik Joelsson
8187443: Forest Consolidation: Move files to unified layout
12 сен 2017, 20:03
12 сен 2017, 20:03
3789983
Код
Авторство
О чём код?
/* * @test /nodynamiccopyright/ * @bug 8016175 8078024 * @summary Add bottom-up type-checking support for unambiguous method references * @compile/fail/ref=MethodReference68.out -XDrawDiagnostics MethodReference68.java */ class MethodReference68 { interface F<X> { String m(X x); } static class Foo { String getName() { return ""; } } @SuppressWarnings("unchecked") <Z> void g(F<Z> fz, Z... zs) { } void test() { g(Foo::getName); g(Foo::getName, 1); //incompatible constraints, Z <: Foo, Z :> Integer } }