Details
-
Bug
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
None
-
None
Description
Probably related to GROOVY-10277.
I have the following program
class Main { static final void test() { java.util.stream.StreamSupport.<Process>stream(()-> 1, 1, false); // Error, the return type of lamba is not compatible with the expected type. } }
Actual behavior
The compiler accepts the program
Expected behavior
Reject the program with an error of the form: "error: incompatible types: bad return type in lambda expression"