Skip to content

[6.0] Look through @Sendable conversions when considering C function pointer conversions. #73437

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

Conversation

jckarter
Copy link
Contributor

@jckarter jckarter commented May 4, 2024

Explanation: Fixes an incorrect diagnostic when attempting to use a Swift function as a C function pointer in Swift 6 mode.
Scope: Fixes a bug that may impact source compatibility and C interoperability when transitioning to Swift 6 mode or strict concurrency checking.
Issue: rdar://127521718
Original PR: #73436
Risk: Low. This removes an incorrect error diagnostic in a fairly narrow situation.
Testing: Test case from bug report, Swift CI
Reviewer: TBD

…ter conversions.

Adding (or removing) `@Sendable` doesn't add context, so it shouldn't prevent
conversion to a C function pointer. Fix for rdar://127521718.
@jckarter jckarter requested a review from a team as a code owner May 4, 2024 00:56
@jckarter
Copy link
Contributor Author

jckarter commented May 4, 2024

@swift-ci Please test

Copy link
Member

@hborla hborla left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@hborla hborla merged commit 94c988c into swiftlang:release/6.0 May 8, 2024
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