Sat, 22 Dec 2018 13:10:38 -0800
Added tag jdk8u202-b25 for changeset 15d8c732039b
1 /*
2 * @test /nodynamiccopyright/
3 * @bug 8030816
4 * @summary javac can't compile program with lambda expression
5 * @compile/fail/ref=CrashLambdaExpressionWithNonAccessibleIdTest.out -XDrawDiagnostics CrashLambdaExpressionWithNonAccessibleIdTest.java
6 */
8 /* This test must make sure that javac won't crash when compiling lambda
9 * containing an anonymous innerclass based on an unresolvable type.
10 */
11 public class CrashLambdaExpressionWithNonAccessibleIdTest {
12 void m() {
13 m1(()-> {
14 new A(){
15 public void m11() {}
16 };
17 });
19 }
21 void m1(Runnable r) {}
22 }