Community
Participate
Working Groups
public interface Foo { int run(int s1, int s2); } interface X { static Foo f = (int x5, int x11) -> x static int x1 = 2; } class C { void method1(){ int p = X.<ctrl-space> } } Wrongly suggesting x5, x11. Only x1 should have been suggested.
(In reply to comment #0) > public interface Foo { > int run(int s1, int s2); > } > > interface X { > > > static Foo f = (int x5, int x11) -> x > static int x1 = 2; > } > > class C { > void method1(){ > int p = X.<ctrl-space> > } > } > > Wrongly suggesting x5, x11. Only x1 should have been suggested. This looks like is due to the syntax error in the lambda expression and how recovery handles it. There is a missing semicolon. If that is addressed there are no incorrect proposals.
Fix and tests available here: http://git.eclipse.org/c/jdt/eclipse.jdt.core.git/commit/?h=BETA_JAVA8&id=6d7da1254151724e22f25d1be0ba01cba8049f5e Anirban, please review. TIA.