I think they are, but I got myself into a situation with this error:
// Inside a SwiftUI View struct...
let cancelled: @MainActor () -> Void
var body: some View {
...
Button(action: self.cancelled) { Text("Cancel") } // Error here
The compiler reports:
Converting function value of type '@MainActor () -> Void' to '() -> Void' loses global actor 'MainActor'
I originally put that attribute on the cancelled
property, because in the passed-in closure, I was doing something that gave me an error about how I had to be on the MainActor.