Bug 575062 - [content assist] lambda + switch breaks content assist on return types
Summary: [content assist] lambda + switch breaks content assist on return types
Status: CLOSED DUPLICATE of bug 576068
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 4.19   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 4.22 M3   Edit
Assignee: Stephan Herrmann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 575919
  Show dependency tree
 
Reported: 2021-07-27 06:04 EDT by Julian Honnen CLA
Modified: 2021-11-06 12:34 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Julian Honnen CLA 2021-07-27 06:04:28 EDT
I have a class where no content assist is offered for return types. I managed to reduce it to the following:

public class ReturnType {

  public Stri/* Content assist here is empty */ test() {

  }

  public void trigger(RetentionPolicy p) {

    switch (p) {
      case RUNTIME:
        break;
      default:
    }

    Callable<Void> c = () -> null;
  }

}


Removing either the switch or the lamdba makes content assist work correctly.
The issue is present both in 4.19 and in Version: 2021-09 (4.21)
Build id: I20210726-1800
Comment 1 Stephan Herrmann CLA 2021-07-31 16:00:11 EDT
(In reply to Julian Honnen from comment #0)
> Removing either the switch or the lamdba makes content assist work correctly.

whoohoo, spooky :)

> The issue is present both in 4.19 and in Version: 2021-09 (4.21)

at least this one is not a regression ...
Comment 2 Stephan Herrmann CLA 2021-11-06 12:34:20 EDT
(In reply to Stephan Herrmann from comment #1)
> (In reply to Julian Honnen from comment #0)
> > Removing either the switch or the lamdba makes content assist work correctly.
> 
> whoohoo, spooky :)
> 
> > The issue is present both in 4.19 and in Version: 2021-09 (4.21)
> 
> at least this one is not a regression ...

It's exactly the same as bug 576068, so a regression since either BETA_JAVA12 or 4.17, not exactly sure which.

*** This bug has been marked as a duplicate of bug 576068 ***