Try to compile
public class ForwardRefTest {
private Runnable t = ()-> {o.toString();};
private Object o = new Object();
}
Anonymous class instead of lambda works fine.
public class ForwardRefTest {
private Runnable t = ()-> {o.toString();};
private Object o = new Object();
}
Anonymous class instead of lambda works fine.
- relates to
-
JDK-8024809 javac, some lambda programs are rejected by flow analysis
- Closed