-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Conversation
presentation-compiler/src/main/dotty/tools/pc/SignatureHelpProvider.scala
Outdated
Show resolved
Hide resolved
@@ -70,7 +70,7 @@ object SignatureHelpProvider: | |||
new l.SignatureHelp( | |||
signatureInfos.map(signatureToSignatureInformation).asJava, | |||
callableN, | |||
paramN | |||
if signatureInfos.isEmpty then null else paramN |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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 ^^
Backports #20142 to the LTS branch. PR submitted by the release tooling. [skip ci]
Fixes #19969 with @mbovel @rochala