/
githubmirror
/
panama-vector
Обзор
Документация
Войти
/
githubmirror
/
panama-vector
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
test/langtools/tools/javac/lambda/methodReference/MethodRefToInnerWithoutOuter.java
24 строки
668 B
Archie L. Cobbs
8163229: several regression tests have a main method that is never executed
17 янв 2023, 07:43
17 янв 2023, 07:43
382fe51
Код
Авторство
О чём код?
/* * @test /nodynamiccopyright/ * @bug 8081271 * @summary NPE while compiling a program with erroneous use of constructor reference expressions. * @compile/fail/ref=MethodRefToInnerWithoutOuter.out -XDrawDiagnostics MethodRefToInnerWithoutOuter.java */ import java.util.List; import java.util.ArrayList; class MethodRefToInnerBase { class TestString { String str; TestString(String strin) { str = strin; } } } public class MethodRefToInnerWithoutOuter extends MethodRefToInnerBase { public static void meth() { List<String> list = new ArrayList<>(); list.stream().forEach(TestString::new); } }