Skip to content

[ConstraintSystem] Bring back one-way pattern solving for for-in stat… #69304

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
Oct 25, 2023

Conversation

xedin
Copy link
Contributor

@xedin xedin commented Oct 20, 2023

…ements (outside closures)

Type-checker separates where clause from for-in statement's pattern/sequence in closure contexts
which works as a natural barrier for inference, but for-in statements in i.e. function bodies still type-check
all of the for-in statement components together, so we need to make sure that where clause cannot be
used to infer a type of the pattern before its sequence expression.

Resolves: rdar://117220710

…ements (outside closures)

Type-checker separates `where` clause from `for-in` statement's pattern/sequence
in closure contexts  which works as a natural barrier for inference, but
for-in statements in i.e. function bodies still type-check all of the for-in
statement components together, so we need to make sure that where clause
cannot be used to infer a type of the pattern before its sequence expression.

Resolves: rdar://117220710
@xedin
Copy link
Contributor Author

xedin commented Oct 20, 2023

@swift-ci please test

@xedin
Copy link
Contributor Author

xedin commented Oct 20, 2023

@swift-ci please test source compatibility

@xedin xedin merged commit 5a66b62 into swiftlang:main Oct 25, 2023
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