Skip to content

Conversation

jckarter
Copy link
Contributor

@jckarter jckarter commented Jul 9, 2025

Explanation: Fixes a compiler crash when a function returning any Sendable or (any Sendable)? is called through a @preconcurrency interface.
Scope: Fixes a regression introduced by new concurrency behavior.
Issue: rdar://154240007
Original PRs: #82901
Risk: Low. Changes behavior to fix a bug in a limited situation where @preconcurrency code tries to call a function returning any Sendable or some other indirectly-returned type.
Testing: Swift CI, test case from bug report
Reviewers: @xedin

…tations.

A call to a `@preconcurrency` function goes through a function conversion
that removes `Sendable` from existentials among other things. Implement
support for this by bitcasting indirect return slots whose type differs
from the formal indirect return type in concurrency markings only.

Fixes rdar://154240007
@jckarter jckarter requested a review from a team as a code owner July 9, 2025 14:59
@jckarter
Copy link
Contributor Author

jckarter commented Jul 9, 2025

@swift-ci Please test

@jckarter jckarter merged commit 1dd4a99 into swiftlang:release/6.2 Jul 10, 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