Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8016059

Cannot compile following lambda

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P3
    • 8
    • 8
    • tools
    • jdk8 b92

    • b100
    • Verified

    Description

      import javafx.scene.input.MouseEvent;
      import javafx.scene.shape.Rectangle;

      public class Issue {
          public static void main(String[] args) {
              Rectangle r = new Rectangle();
              r.addEventHandler(MouseEvent.MOUSE_CLICKED, t -> System.out.println("dfdf"));
          }
      }
      //output
      Issue.java:9: error: 'void' type not allowed here
              r.addEventHandler(MouseEvent.MOUSE_CLICKED, t -> System.out.println("dfdf"));
                                                                                 
      1 error

      Attachments

        Issue Links

          Activity

            People

              mcimadamore Maurizio Cimadamore
              anazarov Andrey Nazarov (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: