Community
Participate
Working Groups
Consider the following example and try to find References (Ctrl+Shift+G) of 'x' from both LHS and RHS of lambda expressions. It is not possible to find the references in the cases mentioned below in the comments: @FunctionalInterface interface Foo { int foo(int x); } public class T { Foo f1= x -> x; // LHS: Operation Unavailable; // RHS: NPE in code resolve (bug 408230) Foo f2= (int x) -> x; // No references found for both 'x' void bar() { Foo f1= x -> x; // Operation Unavailable on both 'x; Foo f2= (int x) -> x; // LHS: Works on 'x' in "int x" // RHS: Operation Unavailable Foo f3= (int x) -> { return x; }; // Works on both 'x' } }
The same is applicable while trying to find Declarations (Ctrl+G) also.
Closing as the given examples work now. Reported bug 429738 for Ctrl+G with type-less lambda parameters.