Skip to content

[5.7][CSClosure] Mark partially inferred external declarations as invalid #58717

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 2 commits into from
May 10, 2022

Conversation

xedin
Copy link
Contributor

@xedin xedin commented May 6, 2022

Cherry-pick of #58493


If a syntactic element references an external declaration (relative
to its own context), let's check whether it has any type variables,
and if so, replace them with errors to remove any possibility of
bringing external constraints into element's scope.

Resolves: rdar://92347054

xedin added 2 commits May 6, 2022 10:14
To avoid unnecessary fixes when solver discovers that closure type
is only partially resolved after conjunction failure, let's fix it
up by replacing type variables with placeholders after solution
application.

(cherry picked from commit 717db34)
If a syntactic element references an external declaration (relative
to its own context), let's check whether it has any type variables,
and if so, replace them with errors to remove any possibility of
bringing external constraints into element's scope.

Resolves: rdar://92347054
(cherry picked from commit 67895c2)
@xedin xedin requested a review from hborla May 6, 2022 17:15
@xedin xedin requested a review from a team as a code owner May 6, 2022 17:15
@xedin xedin added the r5.7 label May 6, 2022
@xedin
Copy link
Contributor Author

xedin commented May 6, 2022

@swift-ci please test

@xedin
Copy link
Contributor Author

xedin commented May 6, 2022

@swift-ci please test Linux platform

@xedin
Copy link
Contributor Author

xedin commented May 6, 2022

@swift-ci please test macOS platform

@xedin
Copy link
Contributor Author

xedin commented May 9, 2022

@swift-ci please test macOS platform

@xedin
Copy link
Contributor Author

xedin commented May 9, 2022

@swift-ci please test Linux platform

@xedin xedin merged commit c52ccfc into swiftlang:release/5.7 May 10, 2022
@AnthonyLatsis AnthonyLatsis added 🍒 release cherry pick Flag: Release branch cherry picks swift 5.7 labels Jan 9, 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.7
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants