jdk-24/langtools/test/tools/javac/lambda/T8038182/CrashFunctionDescriptorExceptionTest.java
Vicente Romero 5b199f3cb8 8038182: javac crash with FunctionDescriptorLookupError for invalid functional interface
Co-authored-by: Maurizio Cimadamore <maurizio.cimadamore@oracle.com>
Reviewed-by: mcimadamore
2014-06-19 15:39:37 +01:00

25 lines
556 B
Java

/*
* @test /nodynamiccopyright/
* @bug 8038182
* @summary javac crash with FunctionDescriptorLookupError for invalid functional interface
* @compile/fail/ref=CrashFunctionDescriptorExceptionTest.out -XDrawDiagnostics CrashFunctionDescriptorExceptionTest.java
*/
class CrashFunctionDescriptorExceptionTest {
@SuppressWarnings("unchecked")
void m () {
bar((B b) -> {});
}
<E extends A<E>> void bar(I<E> i) {}
class A<E> {}
class B<E> extends A<E> {}
interface I<E extends A<E>> {
void foo(E e);
}
}