langtools/test/tools/javac/lambda/self_initializer/T8024809/SelfInitializerInLambdaTestb.java
equal
deleted
inserted
replaced
|
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 } |