Skip to content

[ConstraintSystem] Improvements to pattern binding checking #39079

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
Aug 30, 2021

Conversation

xedin
Copy link
Contributor

@xedin xedin commented Aug 27, 2021

I couple of issues I have found while working on multi-statement closure type-checking.

  • When a coerced pattern is set for the binding that needs to be signaled via using setInitializerChecked
  • Pattern coercion used an extraneous flag
  • Property wrapper initializer request attempted could attempt to re-typecheck initializer which left it in an incorrect state.

xedin added 3 commits August 27, 2021 10:16
Once coerced initializer expression has been set for
a particular pattern binding entry, let's mark it as
checked, otherwise decl checker might try to
re-typecheck it.
Coercion should be aligned with `PatternBindingEntryRequest::evaluate`
and that uses only one flag - `TypeResolverContext::PatternBindingDecl`.
…erty wrapper

Assert that if there is an initializer it is already type-checked.
@xedin xedin requested a review from hborla August 27, 2021 18:58
@xedin
Copy link
Contributor Author

xedin commented Aug 27, 2021

@swift-ci please smoke test

@xedin xedin merged commit 1a756d1 into swiftlang:main Aug 30, 2021
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