Skip to content

[codecomplete] Fix unresolved member completion for T within Optional<T> #19567

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

Conversation

benlangmuir
Copy link
Contributor

We need to look through the optional and find the members of T when
doing completion in Optional.

let x: Foo? = .foo

We still don't correctly complete .some/.none, which requires
reconciling the unbound generic type we get from the decl with the real
bound generic type.

rdar://44767478

We need to look through the optional and find the members of T when
doing completion in Optional<T>.

let x: Foo? = .foo

We still don't correctly complete .some/.none, which requires
reconciling the unbound generic type we get from the decl with the real
bound generic type.

rdar://44767478
@benlangmuir benlangmuir requested a review from rintaro September 26, 2018 18:57
@benlangmuir
Copy link
Contributor Author

@swift-ci please smoke test

Copy link
Member

@rintaro rintaro left a comment

Choose a reason for hiding this comment

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

Makes sense!

@rintaro
Copy link
Member

rintaro commented Sep 27, 2018

I will see what we can do for .some/.none.
It also affects other completions, like:

struct Foo<T> {
  static var instance: Foo<T> { return Foo<T>() }
}

let _: Foo<Int> = .#^COMPLETE^# // Currently, this doesn't work.

@benlangmuir benlangmuir merged commit cad921d into swiftlang:master Sep 27, 2018
@benlangmuir benlangmuir deleted the complete-unresolved-optional branch September 27, 2018 15:53
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