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
[NameLookup] SendableCompletionHandlers: Inject @Sendable into Swift decls that could shadow ObjC ones
When `SendableCompletionHandlers` feature is enabled, ClangImporter
is going to inject `@Sendable` attribute into the completion handler
parameter's function type. We need to match this behavior in Swift
declarations that could shadow ObjC declarations otherwise it would
result in ambiguities.
// expected-warning@-1 {{sendability of function types in instance method 'compute(completionHandler:)' of type '(@escaping () -> Void) -> ()' does not match type '(@escaping @Sendable () -> Void) -> Void' declared by the header}}
156
161
}
162
+
163
+
// Methods deliberately has no `@Sendable` to make sure that
164
+
// shadowing rules are preserved when SendableCompletionHandlers feature is enabled.
// expected-warning@-1 {{sendability of function types in instance method 'compute(completionHandler:)' of type '(@escaping () -> Void) -> ()' does not match type '(@escaping @Sendable () -> Void) -> Void' declared by the header}}
163
168
}
169
+
170
+
// Methods deliberately has no `@Sendable` to make sure that
171
+
// shadowing rules are preserved when SendableCompletionHandlers feature is enabled.
0 commit comments