Skip to content

[ClangImporter] SE-0463: Implement @Sendable inference exception for global actor isolated functions #82085

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
Jun 26, 2025

Conversation

xedin
Copy link
Contributor

@xedin xedin commented Jun 7, 2025

Functions that are isolated to a global actor don't have completion
handlers imported as @Sendable. Main actor isolated functions with
completion handlers that are always called on the main actor is a
very common Objective-C pattern, and this carve out will eliminate
false positive warnings in the cases where the main actor annotation
is missing on the completion handler parameter.

Resolves: rdar://149811049

…meter

This lifts the check for the feature flag up into the `importParameterType`
from `importType` and means that completion handler type for `async` variant
is no longer gains `@Sendable` attribute.
@xedin
Copy link
Contributor Author

xedin commented Jun 12, 2025

@swift-ci please test

…r global actor isolated functions

Functions that are isolated to a global actor don't have completion
handlers imported as `@Sendable`. Main actor isolated functions with
completion handlers that are always called on the main actor is a
very common Objective-C pattern, and this carve out will eliminate
false positive warnings in the cases where the main actor annotation
is missing on the completion handler parameter.

Resolves: rdar://149811049
@xedin
Copy link
Contributor Author

xedin commented Jun 12, 2025

@swift-ci please test

@xedin
Copy link
Contributor Author

xedin commented Jun 12, 2025

@swift-ci please test macOS platform

@xedin
Copy link
Contributor Author

xedin commented Jun 19, 2025

@swift-ci please smoke test

@xedin
Copy link
Contributor Author

xedin commented Jun 19, 2025

@swift-ci please smoke test Linux platform

1 similar comment
@xedin
Copy link
Contributor Author

xedin commented Jun 20, 2025

@swift-ci please smoke test Linux platform

@xedin
Copy link
Contributor Author

xedin commented Jun 23, 2025

@swift-ci please smoke test macOS platform

4 similar comments
@xedin
Copy link
Contributor Author

xedin commented Jun 25, 2025

@swift-ci please smoke test macOS platform

@xedin
Copy link
Contributor Author

xedin commented Jun 25, 2025

@swift-ci please smoke test macOS platform

@xedin
Copy link
Contributor Author

xedin commented Jun 25, 2025

@swift-ci please smoke test macOS platform

@xedin
Copy link
Contributor Author

xedin commented Jun 26, 2025

@swift-ci please smoke test macOS platform

@xedin xedin merged commit 32a0d80 into swiftlang:main Jun 26, 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.

2 participants