Community
Participate
Working Groups
The following program generates an incorrect message about xyz being undefined: interface I { String foo(Integer x); } public class X { static void goo(String s) { } static void goo(I i) { } public static void main(String[] args) { goo((xyz) -> { System.out.println(xyz); return xyz. }); } }
Another program showing weird error message is below. Once the extra semicolon at the bottom is removed, code compiles fine: import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.Comparator; public class X { int compareTo(X x) { return 0; } void foo() { Collections.sort(new ArrayList<X>(Arrays.asList(new X(), new X(), new X())), (X o1, X o2) -> o1.compareTo(o2)); //[2] } } }
Released tests for the problematic snippets here: http://git.eclipse.org/c/jdt/eclipse.jdt.core.git/commit/?h=BETA_JAVA8&id=0ac384309d9e7a05eca3c3a40adf81679fddc64b. The tests encode the present buggy behavior.
I will not be able to finish this. Reassigning to inbox.
Lambda recovery deferred to 4.6
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie.