/
githubmirror
/
panama-vector
Обзор
Документация
Войти
/
githubmirror
/
panama-vector
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
test/langtools/tools/javac/lambda/methodReferenceExecution/MethodReferenceTestVarHandle_neg.java
22 строки
623 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/ * @summary test for VarHandle signature polymorphic methods with wrong return type * @compile/fail/ref=MethodReferenceTestVarHandle_neg.out -XDrawDiagnostics MethodReferenceTestVarHandle_neg.java */ import java.lang.invoke.*; import java.util.*; public class MethodReferenceTestVarHandle_neg { interface Setter { int apply(int[] arr, int idx, int val); } public static void meth() { VarHandle vh = MethodHandles.arrayElementVarHandle(int[].class); // Return type of Setter::apply does not match return type of VarHandle::set Setter f = vh::set; } }