You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// expected-warning@-1 {{cannot convert '@execution(caller) @Sendable () async -> NonSendable' to '() async -> NonSendable' because crossing of an isolation boundary requires parameter and result types to conform to 'Sendable' protocol}}
124
124
125
125
let _:@MainActor(NonSendable)async->Void= nonIsolated1 // Ok
126
-
let _:@MainActor(NonSendable)async->Void= nonIsolated2 // Ok
126
+
let _:@MainActor(NonSendable)async->Void= nonIsolated2 // expected-note {{type 'NonSendable' does not conform to 'Sendable' protocol}}
127
+
// expected-warning@-1 {{cannot convert '@Sendable (NonSendable) async -> Void' to '@MainActor (NonSendable) async -> Void' because crossing of an isolation boundary requires parameter and result types to conform to 'Sendable' protocol}}
127
128
128
129
let _:@MainActor()async->NonSendable= nonIsolated3 // Ok
129
-
let _:@MainActor()async->NonSendable= nonIsolated4 // Ok
130
+
let _:@MainActor()async->NonSendable= nonIsolated4 // expected-note {{type 'NonSendable' does not conform to 'Sendable' protocol}}
131
+
// expected-warning@-1 {{cannot convert '@Sendable () async -> NonSendable' to '@MainActor () async -> NonSendable' because crossing of an isolation boundary requires parameter and result types to conform to 'Sendable' protocol}}
130
132
131
133
let _:@MainActor(NonSendable)async->Void= caller1 // Ok
132
134
let _:@MainActor()async->NonSendable= caller2 // Ok
0 commit comments