mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-20 02:54:35 +02:00
8038182: javac crash with FunctionDescriptorLookupError for invalid functional interface
Co-authored-by: Maurizio Cimadamore <maurizio.cimadamore@oracle.com> Reviewed-by: mcimadamore
This commit is contained in:
parent
17f9ae5713
commit
5b199f3cb8
4 changed files with 40 additions and 5 deletions
|
@ -0,0 +1,24 @@
|
|||
/*
|
||||
* @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);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue