Skip to content

Wrong signature help in two edge cases #15244

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

Closed
tgodzik opened this issue May 20, 2022 · 5 comments · Fixed by #15278
Closed

Wrong signature help in two edge cases #15244

tgodzik opened this issue May 20, 2022 · 5 comments · Fixed by #15278
Assignees

Comments

@tgodzik
Copy link
Contributor

tgodzik commented May 20, 2022

Compiler version

3.2.0-RC1-bin-20220519-ee9cc8f-NIGHTLY

Minimized code

For signature help with cursor located at @@:
1.

object a {
  List(1, 2@@
}
object a {
  def curry(a: Int, b: Int)(c: Int) = a
  curry(1)(3@@)
}

Output

Empty output.

Expectation

apply[A](xs: A*): List[A]
         ^^^^^^
curry(a: Int, b: Int)(c: Int): Int
                      ^^^^^^
@tgodzik tgodzik added itype:bug stat:needs triage Every issue needs to have an "area" and "itype" label area:ide and removed stat:needs triage Every issue needs to have an "area" and "itype" label labels May 20, 2022
@tgodzik
Copy link
Contributor Author

tgodzik commented May 20, 2022

Actually, scratch that. It seems only the second case is failing.

@tgodzik
Copy link
Contributor Author

tgodzik commented May 20, 2022

I added another case for a broken code that should still suggest signature help.

@tgodzik
Copy link
Contributor Author

tgodzik commented May 20, 2022

Another potential thing to fix:

object a {
  Option(1, 2, @@2)
}

we should still show signature help for Option even if user wrote too much.

Currently it shows apply for tuple3

apply[T1, T2, T3](_1: T1, _2: T2, _3: T3): (T1, T2, T3)
                                 ^^^^^^

@rochala rochala self-assigned this May 20, 2022
@rochala
Copy link
Contributor

rochala commented May 20, 2022

Do we ever want to show tuple signature ? In my opinion no, what do you say ?

@tgodzik
Copy link
Contributor Author

tgodzik commented May 20, 2022

Do we ever want to show tuple signature ? In my opinion no, what do you say ?

I would say that we don't want to show it ever.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants