/
githubmirror
/
panama-vector
Обзор
Документация
Войти
/
githubmirror
/
panama-vector
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
test/langtools/tools/javac/lambda/8074381/T8074381a.java
35 строк
876 B
Dan Smith
8257845: Integrate JEP 390
09 дек 2020, 02:04
09 дек 2020, 02:04
48d8650
Код
Авторство
О чём код?
/* * @test /nodynamiccopyright/ * @bug 8074381 * @summary java.lang.AssertionError during compiling * @compile/fail/ref=T8074381a.out -XDrawDiagnostics T8074381a.java */ class T8074381a { interface Sup<X> { boolean m(X x); } interface Sub<X> extends Sup<String> { boolean m(String s); } @SuppressWarnings({"deprecation", "removal"}) void testRaw() { Sub s1 = c -> true; Sub s2 = Boolean::new; Sub s3 = new Sub() { @Override public boolean m(String o) { return true; } }; } @SuppressWarnings({"deprecation", "removal"}) void testNonRaw() { Sub<Integer> s1 = c -> true; Sub<Integer> s2 = Boolean::new; Sub<Integer> s3 = new Sub<Integer>() { @Override public boolean m(String o) { return true; } }; } }