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
Merge pull request #80911 from gottesmm/pr-52ba504b4ba7185b4e3f34ed03b36721f4ad3d82
[rbi] Simplify some logic that got confused so that passing an actor isolated value to a callee that is isolated ot the same actor is not considered a send.
Copy file name to clipboardExpand all lines: test/Concurrency/concurrent_value_checking.swift
+4-6Lines changed: 4 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -141,9 +141,8 @@ func globalTest() async {
141
141
// expected-warning@+2 {{expression is 'async' but is not marked with 'await'}}
142
142
// expected-note@+1 {{property access is 'async'}}
143
143
leta= globalValue // expected-warning{{non-sendable type 'NotConcurrent?' of let 'globalValue' cannot exit global actor 'SomeGlobalActor'-isolated context}}
144
-
awaitglobalAsync(a) // expected-tns-warning {{sending 'a' risks causing data races}}
145
-
// expected-tns-note @-1 {{sending global actor 'SomeGlobalActor'-isolated 'a' to global actor 'SomeGlobalActor'-isolated global function 'globalAsync' risks causing data races between global actor 'SomeGlobalActor'-isolated and local nonisolated uses}}
146
-
awaitglobalSync(a) // expected-tns-note {{access can happen concurrently}}
144
+
awaitglobalAsync(a)
145
+
awaitglobalSync(a)
147
146
148
147
// expected-warning@+2 {{expression is 'async' but is not marked with 'await'}}
149
148
// expected-note@+1 {{property access is 'async'}}
// expected-warning@+2 {{expression is 'async' but is not marked with 'await'}}
179
178
// expected-note@+1 {{property access is 'async'}}
180
179
leta= globalValue // expected-warning {{non-sendable type 'NotConcurrent?' of let 'globalValue' cannot exit global actor 'SomeGlobalActor'-isolated context}}
181
-
awaitglobalAsync(a) // expected-tns-warning {{sending 'a' risks causing data races}}
182
-
// expected-tns-note @-1 {{sending global actor 'SomeGlobalActor'-isolated 'a' to global actor 'SomeGlobalActor'-isolated global function 'globalAsync' risks causing data races between global actor 'SomeGlobalActor'-isolated and local main actor-isolated uses}}
183
-
awaitglobalSync(a) // expected-tns-note {{access can happen concurrently}}
180
+
awaitglobalAsync(a)
181
+
awaitglobalSync(a)
184
182
_ =awaitClassWithGlobalActorInits(nc)
185
183
// expected-tns-warning @-1 {{non-Sendable 'ClassWithGlobalActorInits'-typed result can not be returned from global actor 'SomeGlobalActor'-isolated initializer 'init(_:)' to main actor-isolated context}}
186
184
// expected-tns-warning @-2 {{sending 'nc' risks causing data races}}
0 commit comments