|
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 */ |
|
7 |
|
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 }); |
|
18 |
|
19 } |
|
20 |
|
21 void m1(Runnable r) {} |
|
22 } |