Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 409253 - [1.8][search] Unable to find References and Declarations of lambda expression parameters
Summary: [1.8][search] Unable to find References and Declarations of lambda expression...
Status: RESOLVED WORKSFORME
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.3   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: BETA J8   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 408230
Blocks: 405305
  Show dependency tree
 
Reported: 2013-05-28 04:33 EDT by Noopur Gupta CLA
Modified: 2014-03-06 03:23 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Noopur Gupta CLA 2013-05-28 04:33:55 EDT
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'
	}
}
Comment 1 Noopur Gupta CLA 2013-05-28 05:03:42 EDT
The same is applicable while trying to find Declarations (Ctrl+G) also.
Comment 2 Noopur Gupta CLA 2014-03-06 03:23:24 EST
Closing as the given examples work now.
Reported bug 429738 for Ctrl+G with type-less lambda parameters.