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
[TypeChecker] Fix @_dynamicReplacement to skip sendable annotations on ObjC declarations
Refactors `@_dynamicReplacement` attribute verification to consider
only exact matches first, and if there are none, attempt to strip
away sendability on ObjC declarations to make sure that any new
`@Sendable` or `any Sendable` introduced to `@precocurrency` declarations
don't break the overload selection.
// expected-warning@-1 {{sendability of function types in class method 'sendData(completion:)' does not match requirement in protocol 'CompletionWithoutSendable'}}
204
208
// It should be possible to infer `T` from method that mismatches on @Sendable in Swift 5 mode
205
209
}
210
+
211
+
extensionTestDR{
212
+
@_dynamicReplacement(for:test(completion:))
213
+
func __replaceObjCFunc(_:@escaping()->Void){} // Ok
// expected-error@-1 {{sendability of function types in class method 'sendData(completion:)' does not match requirement in protocol 'CompletionWithoutSendable'}}
211
215
// It should be possible to infer `T` from method that mismatches on @Sendable in Swift 5 mode
212
216
}
217
+
218
+
extensionTestDR{
219
+
@_dynamicReplacement(for:test(completion:))
220
+
func __replaceObjCFunc(_:@escaping()->Void){} // Ok
0 commit comments