Skip to content

[AST/Sema] Add new function type isolation - caller to cover @execution(caller) attribute #79375

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 4 commits into from
Feb 15, 2025

Conversation

xedin
Copy link
Contributor

@xedin xedin commented Feb 13, 2025

  • The kind is called NonIsolatedCaller (we'd rename corresponding ActorIsolation::Kind separately)
  • adjustFunctionTypeForConcurrency is changed to use it when declaration isolation is "caller"
  • Fixed some diagnostics for @execution to apply on to @execution(concurrent) and not @execution(caller).
  • Updated matchFunctionIsolation in the solver to correctly handle conversions to/from caller isolated function types.

Resolves: rdar://142920095

This would make sure that async function types marked as `@execution(caller)`
have correct isolation.

Also defines all of the possible conversions to and from `caller`
isolated function types.
…involve `@execution(...)` behave as expected
@xedin
Copy link
Contributor Author

xedin commented Feb 13, 2025

We still need to make sure that Sendable checking on parameters/result types is performed for some of the conversions.

@xedin
Copy link
Contributor Author

xedin commented Feb 13, 2025

@swift-ci please test

@xedin xedin merged commit 515221c into swiftlang:main Feb 15, 2025
5 checks passed
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.

1 participant