mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Implements the core functionality of SE-0064 / SR-1239, which introduces support for accessing the Objective-C selectors of the getter and setter of an @objc property via #selector(getter: propertyName) and #selector(setter: propertyName). Introduce a bunch of QoI around mistakes using #selector to refer to a property without the "getter:" or "setter:", using Fix-Its to help the user get it right. There is more to do in this area, still, but we have an end-to-end feature working. Much of the implementation and nearly all of the test cases are from Alex Hoppen (@ahoppen). I've done a bit of refactoring, simplified the AST representation, and replaced Alex's custom expression-to-declaration logic with an extension to the constraint solver. The last bit might be short-lived, based on swift-evolution PR280, which narrows the syntax of #selector considerably.
159 KiB
159 KiB