Wed, 24 Sep 2014 11:38:26 -0700
Added tag jdk8u40-b07 for changeset 2fa3858a281f
1 /*
2 * @test /nodynamiccopyright/
3 * @bug 8038182
4 * @summary javac crash with FunctionDescriptorLookupError for invalid functional interface
5 * @compile/fail/ref=CrashFunctionDescriptorExceptionTest.out -XDrawDiagnostics CrashFunctionDescriptorExceptionTest.java
6 */
8 class CrashFunctionDescriptorExceptionTest {
10 @SuppressWarnings("unchecked")
11 void m () {
12 bar((B b) -> {});
13 }
15 <E extends A<E>> void bar(I<E> i) {}
17 class A<E> {}
19 class B<E> extends A<E> {}
21 interface I<E extends A<E>> {
22 void foo(E e);
23 }
24 }