Avatar
Avatar
omochimetaru
@swift-main @swift-5.10.1 @swift-5.9.2 -enable-experimental-feature StrictConcurrency -enable-experimental-feature RegionBasedIsolation final class NonSendable { var a = 1 func mutate() { a += 1 } } @MainActor func setMainActorState(_ x: NonSendable?) {} func main() async { let ns = await withCheckedContinuation { continuation in Task { @MainActor in let ns = NonSendable() continuation.resume(returning: ns) setMainActorState(ns) } } ns.mutate() } (edited)
swiftNightly BOT 2/28/2024 1:35 AM
no output (edited)