Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[regression] content assist fails to find Type when class defines record below #757

Closed
fbricon opened this issue Feb 16, 2023 · 6 comments
Closed
Labels
bug Something isn't working
Milestone

Comments

@fbricon
Copy link

fbricon commented Feb 16, 2023

Tested with https://download.eclipse.org/eclipse/updates/4.27-I-builds/I20230215-0610

Given this code:

import java.util.Map;
import java.util.Set;

public class WTF {
	
  Set<String> set = new TreeSet<>();
  
  record Workflow(String name) {
  };
}

Completion on TreeSet| fails to propose the proper java.util.TreeSet import, as long as the record definition is below the completion site. Remove the record or move it upward, and it works again.

Feb-16-2023 11-28-58

I checked it worked against 2023-03-M1.

I found it while testing our latest jdt.ls build. cc @rgrunber, @testforstephen

@fbricon
Copy link
Author

fbricon commented Feb 16, 2023

Hope this better conveys how bad this is:
Feb-16-2023 11-47-36

@rgrunber
Copy link
Contributor

rgrunber commented Feb 16, 2023

Do the errors also appear in the problems view ? If not, maybe another case of #342 ? Although that was present since 2022-09.

Version: 2023-03 (4.27)
Build id: I20230215-1800

Nevermind, I'm able to reproduce, and this is something else.

Update: It started to fail sometime between I20230130-1330 & I20230206-1800

@rgrunber
Copy link
Contributor

The regression appears to have started with a5490e7 (#667) .

@rgrunber rgrunber added the bug Something isn't working label Feb 16, 2023
@iloveeclipse
Copy link
Member

The regression appears to have started with a5490e7 (#667) .

@gayanper : could you please have a look?

@gayanper
Copy link
Contributor

The regression appears to have started with a5490e7 (#667) .

@gayanper : could you please have a look?

Will have a look

gayanper added a commit to gayanper/eclipse.jdt.core that referenced this issue Feb 17, 2023
Add proper guard condition for CompletionOnRecordComponentName so that
it is created only if the cursor location is in-between the record
declaration start and name end position.
gayanper added a commit that referenced this issue Feb 18, 2023
Add proper guard condition for CompletionOnRecordComponentName so that
it is created only if the cursor location is in-between the record
declaration start and name end position.
@rgrunber
Copy link
Contributor

Version: 2023-03 (4.27)
Build id: I20230218-1800

Fixed with the above build, so closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants