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: don't propose inaccessible named arg defaults #7202

Merged
merged 1 commit into from
Feb 9, 2025

Conversation

harpocrates
Copy link
Contributor

Directly accessing CompletionResult.ScopeMembers.results bypasses accessibility and similar checks. Going through matchingResults ensures we get the same validation we'd get in other scope-based completion contexts.

Before this patch, the newly added test would propose the invalid completion

foo(arg = somePackagePrivStr)

Directly accessing `CompletionResult.ScopeMembers.results` bypasses
accessibility and similar checks. Going through `matchingResults`
ensures we get the same validation we'd get in other scope-based
completion contexts.

Before this patch, the newly added test would propose the invalid
completion

    foo(arg = somePackagePrivStr)
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!

@tgodzik tgodzik merged commit 7a35cd7 into scalameta:main Feb 9, 2025
24 of 25 checks passed
@harpocrates harpocrates deleted the named-arg-defaults branch February 9, 2025 22:24
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.

2 participants