Skip to content
New issue

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

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

Already on GitHub? # to your account

Fix active param index for empty param lists #20142

Merged
merged 2 commits into from
Apr 10, 2024
Merged

Conversation

iusildra
Copy link
Contributor

@iusildra iusildra commented Apr 9, 2024

Fixes #19969 with @mbovel @rochala

@@ -70,7 +70,7 @@ object SignatureHelpProvider:
new l.SignatureHelp(
signatureInfos.map(signatureToSignatureInformation).asJava,
callableN,
paramN
if signatureInfos.isEmpty then null else paramN
Copy link
Contributor

@rochala rochala Apr 9, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ahh, I see why it worked with null on my setup.
This method will never return null if there is at least a single signature present.
I can now confirm that null indeed is not working, and the solution is -1 so
you should change this back to just paramN

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, will push the true fix this evening ^^

@rochala rochala merged commit adf089b into scala:main Apr 10, 2024
19 checks passed
@Kordyjan Kordyjan added this to the 3.5.0 milestone May 10, 2024
WojciechMazur pushed a commit that referenced this pull request Jul 5, 2024
Fixes #19969 with @mbovel @rochala

---------

Co-authored-by: Lucas Nouguier <lucas.nouguier@teads.tv>
[Cherry-picked adf089b]
WojciechMazur added a commit that referenced this pull request Jul 5, 2024
Backports #20142 to the LTS branch.

PR submitted by the release tooling.
[skip ci]
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Signature help shows wrong active parameter for methods with type params and empty param list.
4 participants