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
let _:Int= x.sendableVar // expected-error{{type '@Sendable () -> Void'}}
@@ -67,7 +67,7 @@ func testCalls(x: X) {
67
67
// expected-note@-1 2{{add '@MainActor' to make global function 'testCalls(x:)' part of global actor 'MainActor'}}
68
68
onMainActorAlways() // expected-error{{call to main actor-isolated global function 'onMainActorAlways()' in a synchronous nonisolated context}}
69
69
70
-
let _:()->Void= onMainActorAlways // expected-error{{converting function value of type '@MainActor () -> ()' to '() -> Void' loses global actor 'MainActor'}}
70
+
let _:()->Void= onMainActorAlways // expected-error{{converting function value of type '@MainActor @Sendable () -> ()' to '() -> Void' loses global actor 'MainActor'}}
71
71
72
72
letc=MyModelClass() // okay, synthesized init() is 'nonisolated'
onMainActorAlways() // expected-error{{expression is 'async' but is not marked with 'await'}}
79
79
// expected-note@-1{{calls to global function 'onMainActorAlways()' from outside of its actor context are implicitly asynchronous}}
80
80
81
-
let _:()->Void= onMainActorAlways // expected-error{{converting function value of type '@MainActor () -> ()' to '() -> Void' loses global actor 'MainActor'}}
81
+
let _:()->Void= onMainActorAlways // expected-error{{converting function value of type '@MainActor @Sendable () -> ()' to '() -> Void' loses global actor 'MainActor'}}
82
82
83
83
letc=MyModelClass() // okay, synthesized init() is 'nonisolated'
0 commit comments