Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 422107 - [1.8][code assist] Invoking code assist just before and after a variable initialized using lambda gives different result
Summary: [1.8][code assist] Invoking code assist just before and after a variable init...
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 4.4   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: BETA J8   Edit
Assignee: Srikanth Sankaran CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 402079
  Show dependency tree
 
Reported: 2013-11-20 00:44 EST by Martin Mathew CLA
Modified: 2013-11-30 19:57 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 Martin Mathew CLA 2013-11-20 00:44:32 EST
Consider the below code snippet:

import java.io.Serializable;

interface I {
    void doit();
}

public class X { 

// Invoke code assist<Ctrl+space> in this location gives 20+ suggestions
    Object o = (I & Serializable) () -> {};
// Invoke code assist<Ctrl+space> in this location gives just 4 template proposals
   
}

Invoking code assist just before and after a variable initialized using lambda gives different result.
Comment 1 Srikanth Sankaran CLA 2013-11-30 08:56:41 EST
This got subsumed by one of the recent fixes. I added tests and released it
here: http://git.eclipse.org/c/jdt/eclipse.jdt.core.git/commit/?h=BETA_JAVA8&id=dc77cb172c0128b4f7cc2d542080aeb45e16857f