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

fix: don't suggest completions for param names in definition #6620

Merged
merged 2 commits into from
Jul 26, 2024

Conversation

kasiaMarek
Copy link
Contributor

@kasiaMarek kasiaMarek commented Jul 25, 2024

resolves: #6623

@kasiaMarek kasiaMarek force-pushed the completions-for-param-defs branch from 235bdc6 to a1dc9dd Compare July 25, 2024 11:48
@kasiaMarek kasiaMarek requested a review from tgodzik July 25, 2024 13:16
@@ -527,6 +527,9 @@ class Completions(
case Literal(Constant(null)) :: tl =>
advancedCompletions(tl, pos, completionPos)

// def foo(a@@)
case (vd: ValDef) :: (d : DefDef) :: _ if d.paramss.flatten.exists(_.span.contains(vd.span)) =>
(KeywordsCompletions.contribute(path, completionPos), true)
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we just allow implicit and using keywords?

@kasiaMarek kasiaMarek requested a review from tgodzik July 26, 2024 08:30
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!

@kasiaMarek kasiaMarek merged commit 48acd71 into scalameta:main Jul 26, 2024
22 of 24 checks passed
tgodzik added a commit to scala/scala3 that referenced this pull request Aug 12, 2024
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.

Completions offered in invalid position in Scala 3
2 participants