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-note @-1 {{sending global actor 'CustomActor'-isolated 'x' to main actor-isolated global function 'transferToMain'}}
106
106
_ = consume x // expected-note {{consumed here}}
107
107
} // expected-note {{used here}}
108
+
109
+
actorActorTestCase{
110
+
letk=Klass()
111
+
112
+
// TODO: This crashes the compiler since we attempt to hop_to_executor to the
113
+
// value that is materialized onto disk.
114
+
//
115
+
// consuming func test() async {
116
+
// await transferToMain(k)
117
+
// }
118
+
119
+
borrowingfunc test2()async{
120
+
awaittransferToMain(k) // expected-warning {{sending 'self.k' risks causing data races}}
121
+
// expected-note @-1 {{sending 'self'-isolated 'self.k' to main actor-isolated global function 'transferToMain' risks causing data races between main actor-isolated and 'self'-isolated uses}}
0 commit comments