Skip to content

[5.3] [CS] Connect closure to referenced vars #31313

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

hamishknight
Copy link
Contributor

@hamishknight hamishknight commented Apr 25, 2020

Cherry-pick of #31304, reviewed by @xedin.


Previously we were only connecting a closure constraint to type variables from param decls that it referenced. This worked fine up until we started type-checking for-in statements entirely in the constraint system, meaning that closures can now reference type variables from the element pattern.

Tweak the collection logic to consider vars too.

Resolves rdar://problem/62339835

Previously we were only connecting a closure
constraint to type variables from param decls that
it referenced. This worked fine up until we
started type-checking for-in statements entirely
in the constraint system, meaning that closures
can now reference type variables from the element
pattern.

Tweak the collection logic to consider vars too.

Resolves rdar://62339835
@hamishknight
Copy link
Contributor Author

@swift-ci please test

@hamishknight hamishknight merged commit 95f8121 into swiftlang:release/5.3 Apr 25, 2020
@hamishknight hamishknight deleted the connect-closure-to-vars-5.3 branch April 25, 2020 14:40
@AnthonyLatsis AnthonyLatsis added swift 5.3 🍒 release cherry pick Flag: Release branch cherry picks labels Jan 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🍒 release cherry pick Flag: Release branch cherry picks swift 5.3
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants