Avatar
@swift-main func foo<I: Actor>(actor: isolated I, body: @Sendable () -> Void) { // await不要 bar(actor: actor, body: body) } func bar<I: Actor>(actor: isolated I, body: @Sendable () -> Void) {} @MainActor func main() async { // await必要。なんで? await foo(actor: MainActor.shared, body: { }) }