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
awaittransferToMain(x2) // expected-error {{transferring value of non-Sendable type 'NonSendableCStruct' from nonisolated context to main actor-isolated context}}
31
-
useValue(y2) // expected-note {{access here could race}}
31
+
useValue(y2) // expected-note {{use here could race}}
32
32
}
33
33
34
34
func funcTestTransferringArg()async{
35
35
letx=NonSendableCStruct()
36
-
transferUserDefinedIntoGlobalFunction(x) // expected-error {{binding of non-Sendable type 'NonSendableCStruct' accessed after being transferred}}
37
-
useValue(x) // expected-note {{access here could race}}
36
+
transferUserDefinedIntoGlobalFunction(x) // expected-error {{value of non-Sendable type 'NonSendableCStruct' accessed after being transferred; later accesses could race}}
37
+
useValue(x) // expected-note {{use here could race}}
awaittransferToMain(x2) // expected-error {{transferring 'x2' may cause a race}}
48
49
// expected-note @-1 {{transferring disconnected 'x2' to main actor-isolated callee could cause races in between callee main actor-isolated and local nonisolated uses}}
49
-
useValue(y2) // expected-note {{access here could race}}
50
+
useValue(y2) // expected-note {{use here could race}}
50
51
}
51
52
52
53
func funcTestTransferringArg()async{
53
54
letx=NSObject()
54
-
transferNSObjectToGlobalFunction(x) // expected-error {{binding of non-Sendable type 'NSObject' accessed after being transferred}}
55
-
useValue(x) // expected-note {{access here could race}}
55
+
transferNSObjectToGlobalFunction(x) // expected-error {{transferring 'x' may cause a race}}
56
+
// expected-note @-1 {{'x' used after being passed as a transferring parameter; Later uses could race}}
57
+
useValue(x) // expected-note {{use here could race}}
0 commit comments