jdk-24/test/langtools/tools/javac/lambda/self_initializer/T8024809/SelfInitializerInLambdaTestb.java
2017-09-12 19:03:39 +02:00

18 lines
439 B
Java

/*
* @test /nodynamiccopyright/
* @bug 8024809
* @summary javac, some lambda programs are rejected by flow analysis
* @compile/fail/ref=SelfInitializerInLambdaTestb.out -XDrawDiagnostics SelfInitializerInLambdaTestb.java
*/
public class SelfInitializerInLambdaTestb {
final Runnable r1;
final Runnable r2 = ()-> System.out.println(r1);
SelfInitializerInLambdaTestb() {
r1 = ()->System.out.println(r1);
}
}