| Summary: | [1.8][content assist] Incorrect choices displayed for arguments and body in lambda expression | ||
|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Manoj N Palat <manoj.palat> |
| Component: | Core | Assignee: | JDT-Core-Inbox <jdt-core-inbox> |
| Status: | CLOSED WONTFIX | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | srikanth_sankaran |
| Version: | 4.4 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows 7 | ||
| See Also: |
https://bugs.eclipse.org/bugs/show_bug.cgi?id=424097 https://bugs.eclipse.org/bugs/show_bug.cgi?id=434181 |
||
| Whiteboard: | stalebug | ||
*** Bug 424097 has been marked as a duplicate of this bug. *** interface I {
void foo();
}
class Y {
void goo(I i) {};
}
public class X {
public static void main(String[] args) {
Y y = new Y();
y.goo(() -> /*Press Ctrl-Space before this comment to get 'y' as a choice*/ );
}
}
Maybe yet another case of second issue, but lambda in a parameter context
Retargetting to 4.4, will pull up to Java 8 GA if time permits. moving out of 4.5 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. |
interface I { public int foo(int x, int y) ; } public class X { public void bar() { I i = (x, /*here*/) -> x + y; /* statement */ } } First Issue: Press <Ctrl-Space> before /*here*/; incorrect choices are displayed. Second Issue: Replace the statement above with the one below: I i = (x, y) -> x + /* second issue */; Press <Ctrl-Space> before the /* second issue */ comment. Alongwith legal choices, illegal ones including toString(), bar() etc are displayed.