Skip to content

[CodeCompletion] Remove unresolved type in prepareForRetypechecking() #18721

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 2 commits into from
Aug 16, 2018

Conversation

rintaro
Copy link
Member

@rintaro rintaro commented Aug 15, 2018

Unresolved type attached to expressions may fail re-typechecking. Reset them to null type so it properly re-typechecked.

Also, disallow unresolved type in typeCheckCompletionSequence(). It doesn't provide useful completions to developers.

rdar://problem/41224316

Unresolved type attached to expressions may fail re-typechecking.
Also, disallow unresolved type in typeCheckCompletionSequence(). It doesn't
provide useful completions to developers.

rdar://problem/41224316
in PotentialBindings::addPotentialBinding()
@rintaro
Copy link
Member Author

rintaro commented Aug 15, 2018

@swift-ci Please smoke test

@rintaro rintaro requested a review from benlangmuir August 15, 2018 11:41
@slavapestov
Copy link
Contributor

@rintaro When exactly does code completion need to recheck expressions multiple times? It would be nice to avoid that.

Could it at least get the type, without applying a solution?

@rintaro
Copy link
Member Author

rintaro commented Aug 16, 2018

@slavapestov When finding postfix completion, in current implementation, code-completion tries type checking for each potential operators reusing LHS.

Although these typecheck is not so heavy operation as the type of LHS is pre-determined, team and I agree this is not the best solution. I will pursue a solution without rechecking.

@rintaro
Copy link
Member Author

rintaro commented Aug 16, 2018

@swift-ci Please smoke test OS X platform

@rintaro rintaro merged commit 5753e12 into swiftlang:master Aug 16, 2018
@rintaro rintaro deleted the ide-rdar41224316 branch August 16, 2018 06:55
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.

3 participants