Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 573314

Summary: [content assist] Completions are not working inside lambda expressions with a token
Product: [Eclipse Project] JDT Reporter: Gayan Perera <gayanper>
Component: CoreAssignee: JDT-Core-Inbox <jdt-core-inbox>
Status: CLOSED WORKSFORME QA Contact:
Severity: normal    
Priority: P3 CC: stephan.herrmann
Version: 4.20   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard: stalebug

Description Gayan Perera CLA 2021-05-03 04:48:33 EDT
Take the following code,

package workbench;

import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.Callable;
import java.util.concurrent.TimeUnit;

public class App
{
  private List<String> names = new ArrayList<String>();

  private void foo()
  {
    boo(5, null, () -> na$);
  }

  private <T> void boo(int time, TimeUnit unit, Callable<T> callable)
  {

  }

  private <T> void boo(Callable<T> callable)
  {

  }
}

At $ invoking completions i don't get any. But removing the token 'na' I get completions. This was working in build I20210429-1800.
Comment 1 Gayan Perera CLA 2021-05-03 13:06:42 EDT
Tested with latest master and also with I20210502-1800 and it seems it is working. Will check on the original installation i found the problem again.
Comment 2 Stephan Herrmann CLA 2021-05-22 16:45:50 EDT
If you're sure that comment 0 shows an example that had failed before (even if you can't reproduce right now), that would still be a good candidate for a test to be added to the suite :)

If you want to go the extra mile you could bisect our history to see (a) when it started to fail and (b) when it was fixed again. LMK if you could use some help for bisecting.
Comment 3 Eclipse Genie CLA 2023-05-23 00:36:16 EDT
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.
Comment 4 Stephan Herrmann CLA 2023-05-26 14:53:44 EDT
Tested with 2021-03 (4.19): works.

Gayan tested I20210502-1800: works.

We don't know which version failed, but it likely would be one version between these two.

Apparently the bug was quite short-lived or it depended on other circumstances.

Closing.