-
Bug
-
Resolution: Fixed
-
P4
-
8, 9
-
b152
-
Verified
Currently javac is generating the diagnostic position for the mentioned lambdas in this way:
Test.java:17: error: incompatible types: bad return type in lambda expression
foo((x) -> { return ""; System.out.println(""); });
^
The proposal is to show the position where the body starts:
Test.java:17: error: lambda body is neither value nor void compatible
foo((x) -> { return ""; System.out.println(""); });
^
reported at compiler-dev: http://mail.openjdk.java.net/pipermail/compiler-dev/2014-November/009146.html
Test.java:17: error: incompatible types: bad return type in lambda expression
foo((x) -> { return ""; System.out.println(""); });
^
The proposal is to show the position where the body starts:
Test.java:17: error: lambda body is neither value nor void compatible
foo((x) -> { return ""; System.out.println(""); });
^
reported at compiler-dev: http://mail.openjdk.java.net/pipermail/compiler-dev/2014-November/009146.html