Skip to content

[CSFix] SE-0470: Warn about missing @Sendable for unapplied static … #81345

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 1 commit into from
May 7, 2025

Conversation

xedin
Copy link
Contributor

@xedin xedin commented May 6, 2025

…member references until future Swift version

Static member referenced were marked as @Sendable by InferSendableFromCaptures because metatypes used to be always Sendable which is no longer the case, so in order to maintain the source compatibility we need to downgrade missing @Sendable to a warning for unapplied static member references.

This affects primarily operators at the moment because other static members form a curry thunk with a call inside and would be diagnosed as a capture.

Resolves: rdar://150777469

@xedin xedin requested review from ktoso and hborla as code owners May 6, 2025 23:17
@xedin xedin force-pushed the rdar-150777469 branch from d55b993 to ac9e511 Compare May 6, 2025 23:19
@xedin
Copy link
Contributor Author

xedin commented May 6, 2025

@swift-ci please test

@xedin
Copy link
Contributor Author

xedin commented May 7, 2025

@swift-ci please test Linux platform

…member references until future Swift version

Static member referenced were marked as `@Sendable` by `InferSendableFromCaptures`
because metatypes used to be always Sendable which is no longer the case, so in
order to maintain the source compatibility we need to downgrade missing `@Sendable`
to a warning for unapplied static member references.

This affects primarily operators at the moment because other static members
form a curry thunk with a call inside and would be diagnosed as a capture.

Resolves: rdar://150777469
@xedin xedin force-pushed the rdar-150777469 branch from ac9e511 to a57310b Compare May 7, 2025 07:18
@xedin
Copy link
Contributor Author

xedin commented May 7, 2025

@swift-ci please test

@xedin xedin merged commit f298bde into swiftlang:main May 7, 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