Skip to content

[CodeCompletion] Avoid prioritizing unavailable in LookupVisibleDecls #33562

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

Merged
merged 1 commit into from
Aug 20, 2020

Conversation

rintaro
Copy link
Member

@rintaro rintaro commented Aug 20, 2020

public protocol P {}
public extension P {
  @available(*, unavailable)
  func foo() {}
}
struct S: P {
  func foo() {}
}
func test(value: S) {
  value.<HERE>
}

foo() wasn't suggested because lookupVisibleMemberDecls() returned extension P.foo() which has wider accessibility public. But code completion doesn't emit unavailable candidates.

rdar://problem/67155695

@rintaro
Copy link
Member Author

rintaro commented Aug 20, 2020

@swift-ci Please smoke test

@rintaro rintaro requested a review from benlangmuir August 20, 2020 18:25
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