Open dfed opened 1 year ago
This issue also occurs on the release candidate Xcode 14.2 (14C18) with the following Swift compiler version:
swift-driver version: 1.62.15 Apple Swift version 5.7.2 (swiftlang-5.7.2.135.5 clang-1400.0.29.51)
Target: arm64-apple-macosx13.0
Description A
Task
created from within awithUnsafeContinuation
closure executed within an actor-isolated method executes outside of the actor's isolated context.This issue is quite similar to #61485, except that:
Task
created within awithUnsafeContinuation
closure.Steps to reproduce The following test fails when run on Xcode 14.1 and macOS 13.0.1 and tvOS 16.1:
Expected behavior I expect that the above test succeeds on all platforms.
This test can be made to succeed on all platforms by updating the
TestActor
as follows:Environment
Additional context This issue was discovered while trying to create an ordered executor for async tasks that can be enqueued from a nonisolated synchronous context.
I have not tested this code against watchOS just yet.