MainActor-isolated property not called on the Main Actor #72633
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
concurrency
Feature: umbrella label for concurrency language features
Description
Reproduction code works on both iOS and MacOS. Since
SwiftUI.App.body
is MainActor-isolated,nonIsolatedSyncProperty
also called on the Main Actor because it's sync, but its task is non-isolated and called not on the Main Actor, but then it calls MainActor-isolatedisolatedGlobalSyncProperty
and it crashes because it's called not on the Main Actor for some reason.Reproduction
Expected behavior
isolatedGlobalSyncProperty
called on the Main Actor.Environment
swift-driver version: 1.90.11.1 Apple Swift version 5.10 (swiftlang-5.10.0.13 clang-1500.3.9.4)
Target: x86_64-apple-macosx14.0
Additional information
Reproduction code results in a crash with output:
SwiftConcurrencyMac/SwiftConcurrencyMacApp.swift:11: Fatal error: Incorrect actor executor assumption; Expected 'UnownedSerialExecutor(executor: (Opaque Value))' executor. Isolated global sync property called not on the Main Actor
The text was updated successfully, but these errors were encountered: