Skip to content
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

[6.1] [CS] Use adjusted type for single curry thunks #77792

Open
wants to merge 3 commits into
base: release/6.1
Choose a base branch
from

Conversation

hamishknight
Copy link
Contributor

6.1 cherry-pick of #77765

  • Explanation: Fixes an assertion failure that could occur with -swift-version 6 when forming a reference to an unapplied function
  • Scope: Affects type-checking of unapplied functions
  • Issue: rdar://140212823
  • Risk: Medium-Low, the fix brings the handling of single-curry thunks more in-line with that of double-curry thunks
  • Testing: Added tests to test suite
  • Reviewer: Pavel Yaskevich

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 hamishknight added 🍒 release cherry pick Flag: Release branch cherry picks swift 6.1 labels Nov 21, 2024
@hamishknight hamishknight requested a review from a team as a code owner November 21, 2024 21:28
@hamishknight
Copy link
Contributor Author

@swift-ci please test

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 6.1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant