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}}
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