JDK-8028059 : javac: illegal forward reference since b115
  • Type: Bug
  • Component: tools
  • Sub-Component: javac
  • Priority: P3
  • Status: Resolved
  • Resolution: Not an Issue
  • OS: generic
  • CPU: generic
  • Submitted: 2013-11-08
  • Updated: 2014-04-25
  • Resolved: 2013-11-08
Related Reports
Relates :  
Description
Try to compile 

public class ForwardRefTest {
    private Runnable t = ()-> {o.toString();};
    private Object o = new Object();

}

Anonymous class instead of lambda works fine.

Comments
This is not a bug is a consequence of a change in the spec implemented as a patch for JDK-8024809
08-11-2013