Thu, 20 Mar 2014 10:42:00 -0700
Merge
aoqi@0 | 1 | /* |
aoqi@0 | 2 | * @test /nodynamiccopyright/ |
aoqi@0 | 3 | * @bug 8030816 |
aoqi@0 | 4 | * @summary javac can't compile program with lambda expression |
aoqi@0 | 5 | * @compile/fail/ref=CrashLambdaExpressionWithNonAccessibleIdTest.out -XDrawDiagnostics CrashLambdaExpressionWithNonAccessibleIdTest.java |
aoqi@0 | 6 | */ |
aoqi@0 | 7 | |
aoqi@0 | 8 | /* This test must make sure that javac won't crash when compiling lambda |
aoqi@0 | 9 | * containing an anonymous innerclass based on an unresolvable type. |
aoqi@0 | 10 | */ |
aoqi@0 | 11 | public class CrashLambdaExpressionWithNonAccessibleIdTest { |
aoqi@0 | 12 | void m() { |
aoqi@0 | 13 | m1(()-> { |
aoqi@0 | 14 | new A(){ |
aoqi@0 | 15 | public void m11() {} |
aoqi@0 | 16 | }; |
aoqi@0 | 17 | }); |
aoqi@0 | 18 | |
aoqi@0 | 19 | } |
aoqi@0 | 20 | |
aoqi@0 | 21 | void m1(Runnable r) {} |
aoqi@0 | 22 | } |