Details
-
Bug
-
Resolution: Fixed
-
P3
-
8
-
jdk 8, 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");
if (true) {
return;
} else {
System.out.println("tttt");
}
});
}
}
//output
Issue.java:11: error: incompatible types: missing return value
return;
^
1 error
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");
if (true) {
return;
} else {
System.out.println("tttt");
}
});
}
}
//output
Issue.java:11: error: incompatible types: missing return value
return;
^
1 error
Attachments
Issue Links
- duplicates
-
JDK-8016059 Cannot compile following lambda
- Closed