langtools/test/tools/javac/T8030816/CrashLambdaExpressionWithNonAccessibleIdTest.java
author ysuenaga
Wed, 30 Mar 2016 21:05:13 +0900
changeset 37218 c7241bc368bf
parent 22685 c8d0807378b6
permissions -rw-r--r--
8151674: STW phases at Concurrent GC should count in PerfCounter Reviewed-by: jmasa, sla, tschatzl

/*
 * @test /nodynamiccopyright/
 * @bug 8030816
 * @summary javac can't compile program with lambda expression
 * @compile/fail/ref=CrashLambdaExpressionWithNonAccessibleIdTest.out -XDrawDiagnostics CrashLambdaExpressionWithNonAccessibleIdTest.java
 */

/* This test must make sure that javac won't crash when compiling lambda
 * containing an anonymous innerclass based on an unresolvable type.
 */
public class CrashLambdaExpressionWithNonAccessibleIdTest {
    void m() {
        m1(()-> {
            new A(){
                public void m11() {}
            };
        });

    }

    void m1(Runnable r) {}
}