vscode-java icon indicating copy to clipboard operation
vscode-java copied to clipboard

Constructor in Records with varargs not found

Open brunoborges opened this issue 3 years ago • 5 comments

Environment
  • JDK version: 17
Steps To Reproduce
  1. Create a Record with last argument being varargs
  2. Attempt to instantiate the record using varargs, from another class.
Current Result
image
Expected Result

Constructor should be found.

Additional Informations

If the record is declared within the same class instantiating it, the extension works fine.

brunoborges avatar Aug 22 '22 18:08 brunoborges

This is an upstream issue. It can be reproduced in Eclipse.

snjeza avatar Aug 22 '22 20:08 snjeza

Reproduced upstream with Eclipse : Version: 2022-09 (4.25) Build id: I20220823-0600

Even stranger is I don't see the error reported in the problems view though it is clearly shown in the editor :neutral_face:

@snjeza , is there a known bug for this we can reference (even old one in bugs.eclipse.org) ? If none, we should probably file a new one.

rgrunber avatar Aug 23 '22 19:08 rgrunber

, is there a known bug for this we can reference (even old one in bugs.eclipse.org) ? If none, we should probably file a new one.

@rgrunber I can't find it.

snjeza avatar Aug 23 '22 22:08 snjeza

Just noticed that the code runs just fine for me, if the above is the only error :neutral_face: . @brunoborges , can you confirm that ? I've included it in the report upstream.

rgrunber avatar Aug 25 '22 19:08 rgrunber

Yeah, code works.

brunoborges avatar Aug 25 '22 20:08 brunoborges

A related PR - https://github.com/eclipse-jdt/eclipse.jdt.core/pull/618

snjeza avatar Dec 26 '22 19:12 snjeza

Fixed with https://github.com/eclipse/eclipse.jdt.ls/pull/2538

snjeza avatar Mar 15 '23 18:03 snjeza