Skip to content

[CSBindings] If hole originates from code completion token avoid "fixing" it #34118

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 3 commits into from
Sep 30, 2020

Conversation

xedin
Copy link
Contributor

@xedin xedin commented Sep 29, 2020

If the hole is originated from code completion expression
let's not try to add a fix, anything connected to a
code completion is allowed to be a hole because presence
of a code completion token makes constraint system
under-constrained due to e.g. lack of expressions on the
right-hand side of the token, which are required for a
regular type-check.

…new bindings

It's possible that bindings would need to mutate constraint system
e.g. by allocating new locators.
…oken as a potential hole

If type variable is associated with a code completion token
it's possible that it doesn't have enough contextual information
to be resolved to anything, so let's add a hole type which originates
from type variable associated with code completion expression to
make this relationship explicit and avoid "fixing" problems rooted
in fact that type variable is underconstrained due to code completion.
…ng it

If the hole is originated from code completion expression
let's not try to add a fix, anything connected to a
code completion is allowed to be a hole because presence
of a code completion token makes constraint system
under-constrained due to e.g. lack of expressions on the
right-hand side of the token, which are required for a
regular type-check.
@xedin xedin requested a review from nathawes September 29, 2020 19:56
@xedin
Copy link
Contributor Author

xedin commented Sep 29, 2020

@swift-ci please smoke test

@xedin xedin marked this pull request as ready for review September 29, 2020 23:43
@xedin xedin merged commit 5e399b9 into swiftlang:main Sep 30, 2020
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