langtools/test/tools/javac/lambda/self_initializer/T8024809/SelfInitializerInLambdaTestb.java
changeset 32164 6c65d5b414bc
parent 21479 e11e5b3aec3d
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/lambda/self_initializer/T8024809/SelfInitializerInLambdaTestb.java	Mon Aug 10 18:10:18 2015 -0700
@@ -0,0 +1,17 @@
+/*
+ * @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);
+    }
+}