Navigation Menu

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

[SR-14450] Filter argument labels by types of existing arguments #56806

Open
ahoppen opened this issue Apr 6, 2021 · 1 comment
Open

[SR-14450] Filter argument labels by types of existing arguments #56806

ahoppen opened this issue Apr 6, 2021 · 1 comment
Labels
code completion Area → source tooling: code completion improvement source tooling Area: IDE support, SourceKit, and other source tooling

Comments

@ahoppen
Copy link
Contributor

ahoppen commented Apr 6, 2021

Previous ID SR-14450
Radar rdar://problem/76265466
Original Reporter @ahoppen
Type Improvement
Additional Detail from JIRA
Votes 0
Component/s CodeCompletion
Labels Improvement
Assignee None
Priority Medium

md5: 6b7796ba9cf4eea385959a84e31eb109

Issue Description:

In the following example, we suggest both `b` and `c` as potential argument labels. However, only `b` should be suggested because the first parameter is an `Int` and thus the second definition of `foo` is not applicable.

func foo(a: Int, b: Int) {}
func foo(a: String, c: Int) {}
foo(a: 1, #^COMPLETE^#)

Fixing this is non-trivial because it means that we’d need to type-check the incomplete expression when completing the argument labels, which we don’t do today.

@ahoppen
Copy link
Contributor Author

ahoppen commented Apr 6, 2021

@swift-ci create

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@AnthonyLatsis AnthonyLatsis added the source tooling Area: IDE support, SourceKit, and other source tooling label Feb 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code completion Area → source tooling: code completion improvement source tooling Area: IDE support, SourceKit, and other source tooling
Projects
None yet
Development

No branches or pull requests

2 participants