Skip to content

[6.3][Concurrency] A few more nonisolated(nonsending) fixes #89267

Open
xedin wants to merge 2 commits into
swiftlang:release/6.3from
xedin:nonisolated_nonsending-fixes-6.3
Open

[6.3][Concurrency] A few more nonisolated(nonsending) fixes #89267
xedin wants to merge 2 commits into
swiftlang:release/6.3from
xedin:nonisolated_nonsending-fixes-6.3

Conversation

@xedin
Copy link
Copy Markdown
Contributor

@xedin xedin commented May 19, 2026

xedin added 2 commits May 19, 2026 11:44
…osure isolation

We need a contextual parent of the closure expression to determine
whether it's a function conversion to a `nonisolated(nonsending)`
function type, without that isolation checker would incorrectly
mark the closure `@concurrent` in cases where solver conservatively
used a conversion instead of apply `nonisolated(nonsending)` onto
the closure directly.

Resolves: swiftlang#87097
Resolves: rdar://170007831
(cherry picked from commit 335db2a)
…lated(nonsending)`

This is a backport of swiftlang#89015

Since SILFunctionType doesn't support a full range of isolation
kinds not setting the isolation of the thunk that reabstracts
a function value into a `nonisolated(nonsending)` one, results
in `OptimizeHopToExecutor` incorrectly removing hops from the thunk.

In turn, at the call site, synchronous code that follows a call to
`nonisolated(nonseding)` function value through a reabstraction thunk,
would be executed on the isolation of the function value called by the
thunk instead of returning to the caller's context.

Resolves: rdar://176709091
Resolves: swiftlang#88993
@xedin xedin requested a review from a team as a code owner May 19, 2026 21:44
@xedin xedin added 🍒 release cherry pick Flag: Release branch cherry picks swift 6.3 labels May 19, 2026
@xedin
Copy link
Copy Markdown
Contributor Author

xedin commented May 19, 2026

@swift-ci please test

Copy link
Copy Markdown
Contributor

@ktoso ktoso left a comment

Choose a reason for hiding this comment

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

Lgtm on these targeted fixes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🍒 release cherry pick Flag: Release branch cherry picks swift 6.3

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants