Skip to content

[CS] Use adjusted type for single curry thunks #77765

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
Nov 21, 2024

Conversation

hamishknight
Copy link
Contributor

This matches the double curry thunk logic and ensures that the resulting autoclosure matches the expected type of the reference, avoiding mismatches with parent expressions. This requires fixing concurrency checking such that it respects global actors on autoclosure thunks, but while here it seems like it ought to respect them on autoclosures more generally.

rdar://140212823

Previously we would only respect global actors
set on explicit closure expressions. Respect them
on autoclosures too.
Doesn't seem to be any reason not to do this
up-front, cleans up the code a little. Should be
NFC.
This matches the double curry thunk logic and
ensures that the resulting autoclosure matches the
expected type of the reference, avoiding mismatches
with parent expressions.

rdar://140212823
@hamishknight
Copy link
Contributor Author

@swift-ci please test

@hamishknight
Copy link
Contributor Author

@swift-ci please test source compatibility

@hamishknight hamishknight merged commit 3e95e81 into swiftlang:main Nov 21, 2024
7 checks passed
@hamishknight hamishknight deleted the thunk-fix branch November 21, 2024 19:01
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