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] Shadowing: strip @Sendable annotations for declarations ObjC/@objc declarations
When `SendableCompletionHandlers` feature is enabled, ClangImporter
is going to inject `@Sendable` attribute into the completion handler
parameter's function type. We need to make sure that his new behavior
doesn't break shadowing rules and allow APIs to annotate their ObjC
declarations with `@Sendable` without breaking clients.
// 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}}
160
165
}
166
+
167
+
// Methods deliberately has no `@Sendable` to make sure that
168
+
// 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}}
167
172
}
173
+
174
+
// Methods deliberately has no `@Sendable` to make sure that
175
+
// shadowing rules are preserved when SendableCompletionHandlers feature is enabled.
0 commit comments