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
Infer protocol isolation from its inherited protocols.
We somehow missed this inference rule. Put it behind SE-0434's
`GlobalActorIsolatedTypesUsability` flag. Fixes rdar://127843050.
(cherry picked from commit 90341b2)
func f(){} // okay, 'f' is MainActor isolated, as is the requirement
170
+
@MainActorfunc g(){} // okay for the same reasons, but more explicitly
171
+
}
172
+
173
+
@SomeGlobalActor
174
+
structS3:InferenceConflict{
175
+
nonisolatedfunc g(){}
176
+
}
177
+
178
+
extensionS3{
179
+
func f(){}
180
+
// expected-error@-1{{global actor 'SomeGlobalActor'-isolated instance method 'f()' cannot be used to satisfy main actor-isolated protocol requirement}}
181
+
//expected-note@-2{{add 'nonisolated' to 'f()' to make this instance method not isolated to the actor}}
0 commit comments