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-14220] Hide protocol requirements witnessed by "more generic" methods from autocomplete #56596

Open
karwa opened this issue Feb 15, 2021 · 1 comment
Labels
code completion Area → source tooling: code completion conformances Feature → protocol: protocol conformances improvement source tooling Area: IDE support, SourceKit, and other source tooling

Comments

@karwa
Copy link
Contributor

karwa commented Feb 15, 2021

Previous ID SR-14220
Radar rdar://problem/74392495
Original Reporter @karwa
Type Improvement

Attachment: Download

Additional Detail from JIRA
Votes 0
Component/s CodeCompletion
Labels Improvement
Assignee None
Priority Medium

md5: 9df225d1e3b8e4cff7e91c54c11b8888

Issue Description:

If I have a type which conforms to LosslessStringConvertible (LSC) via a generic initialiser on StringProtocol:

struct Foo: LosslessStringConvertible {
  init?<S>(_ description: S) where S: StringProtocol {}
  var description: String { "" }
}

Autocomplete will show both the generic initialiser that I wrote, and the non-generic initialiser from LSC. They both get documentation from the protocol requirement, and it feels like clutter to include both of them in the list.

@typesanitizer
Copy link

@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
@AnthonyLatsis AnthonyLatsis added the conformances Feature → protocol: protocol conformances label Mar 7, 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 conformances Feature → protocol: protocol conformances improvement source tooling Area: IDE support, SourceKit, and other source tooling
Projects
None yet
Development

No branches or pull requests

3 participants