Skip to content

[CS] Connect closure to referenced vars #31304

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
Apr 25, 2020

Conversation

hamishknight
Copy link
Contributor

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 hamishknight requested a review from xedin April 25, 2020 00:23
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 hamishknight force-pushed the connect-closure-to-vars branch from c7ea7bf to 2070b2c Compare April 25, 2020 00:26
@swiftlang swiftlang deleted a comment from swift-ci Apr 25, 2020
@hamishknight
Copy link
Contributor Author

@swift-ci please test

@swiftlang swiftlang deleted a comment from swift-ci Apr 25, 2020
@hamishknight hamishknight merged commit 3338b03 into swiftlang:master Apr 25, 2020
@hamishknight hamishknight deleted the connect-closure-to-vars branch April 25, 2020 03:38
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