[Swift] Attribute equivalent of NS_REQUIRES_SUPER
Originator: | martijn | ||
Number: | rdar://17408107 | Date Originated: | 06/21/2014 |
Status: | Open | Resolved: | |
Product: | Developer Tools | Product Version: | |
Classification: | Feature (New) | Reproducible: | Always |
The NS_REQUIRES_SUPER macro (or rather the underlying objc_requires_super LLVM attribute) in Objective-C is used to mark a method that expects a call to the superclass implementation from an overriding method. Swift seems designed to make conventions explicit and allow the compiler to catch common sources of bugs. Supporting an equivalent attribute (@requires_super?) could help generate appropriate error or warning messages at compile time rather than confront the developer with unexpected behavior.
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!