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

bugfix: Completions for named args in wrong order #5728

Merged
merged 1 commit into from Nov 13, 2023

Conversation

jkciesluk
Copy link
Member

@jkciesluk jkciesluk commented Oct 9, 2023

If we have

def foo(aaa: Int, bbb: Int, ccc: Int) = ???
val x = foo(
  bbb = 123,
  ccc = 123,
  @@
)

we want to get aaa completion

@jkciesluk jkciesluk marked this pull request as ready for review October 9, 2023 15:38
Copy link
Contributor

@tgodzik tgodzik left a comment

Choose a reason for hiding this comment

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

LGTM! We might want to update the compiler first.

Comment on lines +74 to +84
NavigateAST.untypedPath(pos.span) match
case (ident: Ident) :: (app: Apply) :: _ =>
Copy link
Contributor

Choose a reason for hiding this comment

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

Do you need the untyped tree, because if the first arg is named Ident isn't there? Is this part totally missing from the typed tree then? Is that why you're passing the untyped Apply?

@jkciesluk jkciesluk merged commit 2c0873c into scalameta:main Nov 13, 2023
24 checks passed
@jkciesluk jkciesluk deleted the named-wrong-order branch November 13, 2023 13:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants