Avatar
@swift-6.0.3 @MainActor enum Hoge { static let count = 10 } func p2(isolation: isolated (any Actor)? = #isolation, body: () async -> Void) async { await body() } func p(isolation: isolated (any Actor)? = #isolation, body: () -> Void) async { await p2(isolation: isolation) { body() } } await Task { @MainActor in await p { print(Hoge.count) MainActor.shared.assertIsolated() } }.value