langtools/test/tools/javac/lambda/self_initializer/T8024809/SelfInitializerInLambdaTestb.java
changeset 32164 6c65d5b414bc
parent 21479 e11e5b3aec3d
equal deleted inserted replaced
32163:2bdcabf14e91 32164:6c65d5b414bc
       
     1 /*
       
     2  * @test /nodynamiccopyright/
       
     3  * @bug 8024809
       
     4  * @summary javac, some lambda programs are rejected by flow analysis
       
     5  * @compile/fail/ref=SelfInitializerInLambdaTestb.out -XDrawDiagnostics SelfInitializerInLambdaTestb.java
       
     6  */
       
     7 
       
     8 public class SelfInitializerInLambdaTestb {
       
     9 
       
    10     final Runnable r1;
       
    11 
       
    12     final Runnable r2 = ()-> System.out.println(r1);
       
    13 
       
    14     SelfInitializerInLambdaTestb() {
       
    15         r1 = ()->System.out.println(r1);
       
    16     }
       
    17 }