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
// FIXME: Region isolation should consider a value from a 'nonisolated(unsafe)'
32
32
// declaration to be in a disconnected region
33
33
34
-
// expected-region-isolation-warning @+3 {{transferring 'it' could cause a race}}
34
+
// expected-region-isolation-warning @+3 {{transferring 'it' may cause a race}}
35
35
// expected-region-isolation-note @+2 {{'it' is transferred from main actor-isolated caller to nonisolated callee. Later uses in caller could race with potential uses in callee}}
36
36
// expected-region-isolation-note @+1 {{access here could race}}
Copy file name to clipboardExpand all lines: test/Concurrency/isolated_captures.swift
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -39,7 +39,7 @@ class NotSendable {
39
39
letns=NotSendable(x:0)
40
40
MyActor.ns = ns
41
41
42
-
// expected-region-isolation-warning @+2 {{transferring 'ns' could cause a race}}
42
+
// expected-region-isolation-warning @+2 {{transferring 'ns' may cause a race}}
43
43
// expected-region-isolation-note @+1 {{transferring global actor 'MyActor'-isolated 'ns' to global actor 'YourActor'-isolated callee could cause races between global actor 'YourActor'-isolated and global actor 'MyActor'-isolated uses}}
44
44
await{@YourActorin
45
45
// expected-complete-warning@+1 {{capture of 'ns' with non-sendable type 'NotSendable' in an isolated closure; this is an error in Swift 6}}
Copy file name to clipboardExpand all lines: test/Concurrency/sendable_checking.swift
+5-5Lines changed: 5 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -251,12 +251,12 @@ final class NonSendable {
251
251
func call()async{
252
252
awaitupdate()
253
253
// expected-targeted-and-complete-warning @-1 {{passing argument of non-sendable type 'NonSendable' into main actor-isolated context may introduce data races}}
254
-
// expected-tns-warning @-2 {{transferring 'self' could cause a race}}
254
+
// expected-tns-warning @-2 {{transferring 'self' may cause a race}}
255
255
// expected-tns-note @-3 {{transferring nonisolated 'self' to main actor-isolated callee could cause races between main actor-isolated and nonisolated uses}}
256
256
257
257
awaitself.update()
258
258
// expected-targeted-and-complete-warning @-1 {{passing argument of non-sendable type 'NonSendable' into main actor-isolated context may introduce data races}}
259
-
// expected-tns-warning @-2 {{transferring 'self' could cause a race}}
259
+
// expected-tns-warning @-2 {{transferring 'self' may cause a race}}
260
260
// expected-tns-note @-3 {{transferring nonisolated 'self' to main actor-isolated callee could cause races between main actor-isolated and nonisolated uses}}
lett=NonSendable() // expected-tns-note {{variable defined here}}
276
276
await t.update()
277
277
// expected-targeted-and-complete-warning @-1 {{passing argument of non-sendable type 'NonSendable' into main actor-isolated context may introduce data races}}
278
-
// expected-tns-warning @-2 {{transferring 't' could cause a race}}
278
+
// expected-tns-warning @-2 {{transferring 't' may cause a race}}
279
279
// expected-tns-note @-3 {{'t' is transferred from nonisolated caller to main actor-isolated callee. Later uses in caller could race with potential uses in callee}}
// expected-targeted-and-complete-warning @-1 {{passing argument of non-sendable type 'NonSendable' outside of main actor-isolated context may introduce data races}}
298
-
// expected-tns-warning @-2 {{transferring 'ns' could cause a race}}
298
+
// expected-tns-warning @-2 {{transferring 'ns' may cause a race}}
299
299
// expected-tns-note @-3 {{transferring main actor-isolated 'ns' to nonisolated callee could cause races between nonisolated and main actor-isolated uses}}
// expected-targeted-and-complete-warning@-1 {{passing argument of non-sendable type 'NonSendable' outside of main actor-isolated context may introduce data races}}
304
-
// expected-tns-warning @-2 {{transferring 'ns' could cause a race}}
304
+
// expected-tns-warning @-2 {{transferring 'ns' may cause a race}}
305
305
// expected-tns-note @-3 {{transferring main actor-isolated 'ns' to nonisolated callee could cause races between nonisolated and main actor-isolated uses}}
0 commit comments