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] Fix actor-isolation override checking with @asyncHandler.
`@asyncHandler` methods can override with a completely different actor
isolation because they will hop to the appropriate actor themselves.
Therefore, allow differing actor isolation when an `@asyncHandler`
method overrides another method, and don't propagate the actor
isolation from the overridden method to the overriding `@asyncHandler`
method.
Copy file name to clipboardExpand all lines: test/Concurrency/global_actor_inference.swift
+16Lines changed: 16 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -181,6 +181,8 @@ class SuperclassWithGlobalActors {
181
181
@GenericGlobalActor<Int>func f(){}
182
182
@GenericGlobalActor<Int>func g(){} // expected-note{{overridden declaration is here}}
183
183
func h(){}
184
+
func i(){}
185
+
func j(){}
184
186
}
185
187
186
188
@GenericGlobalActor<String>
@@ -190,6 +192,20 @@ class SubclassWithGlobalActors : SuperclassWithGlobalActors {
190
192
@GenericGlobalActor<String>overridefunc g(){} // expected-error{{global actor 'GenericGlobalActor<String>'-isolated instance method 'g()' has different actor isolation from global actor 'GenericGlobalActor<Int>'-isolated overridden declaration}}
191
193
192
194
overridefunc h(){} // okay: inferred to unspecified
0 commit comments