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
[Concurrency] Don't let "unsafe" inference block other inference.
The presence of an unsafe global-actor attribute on something we can
infer from (e.g., a witnessed protocol requirement or overridden
declaration) was preventing propagation of actor-isolation attributes
from outer scopes. Only take "positive" results from such places.
Copy file name to clipboardExpand all lines: test/Concurrency/global_actor_inference.swift
+7Lines changed: 7 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -361,6 +361,13 @@ struct StructUGA2: UGA {
361
361
nonisolatedfunc req(){}
362
362
}
363
363
364
+
@SomeGlobalActor
365
+
structStructUGA3:UGA{
366
+
func req(){
367
+
sibling()
368
+
}
369
+
}
370
+
364
371
@GenericGlobalActor<String>
365
372
func testUGA<T:UGA>(_ value:T){
366
373
value.req() // expected-error{{instance method 'req()' isolated to global actor 'SomeGlobalActor' can not be referenced from different global actor 'GenericGlobalActor<String>'}}
0 commit comments