mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
When a particular method/initializer/property/subscript is used to satisfied a requirement in an @objc protocol, infer both the presence of @objc and the @objc name so that it matches the requirement. This eliminates the need to explicitly specify @objc and @objc(foo:bar:) in most cases. Note that we already did this for overrides, so it's a generalization of that behavior. Note that we keep this inference somewhat local, checking only those protocols that the enclosing context conforms to, to limit spooky-action-at-a-distance inference. It's possible that we could lift this restriction later. Fixes rdar://problem/24049773.
86 KiB
86 KiB