No designated initializer specified for the NSProxy root class

Originator:lithium3141
Number:rdar://16561701 Date Originated:08-Apr-2014 08:20 PM
Status:Open Resolved:
Product:OS X SDK Product Version:OS X 10.9.2 (13C64)
Classification:Enhancement Reproducible:Always
 
Summary:
The compiler shipped with Xcode 5.1 introduced support for __attribute__((objc_designated_initializer)). Among other things, this attribute requires a designated initializer on a class to call a designated initializer on the class's superclass. Root classes are exempt from this requirement.

NSProxy, a root class, does not give any method the designated initializer attribute (nor does it even expose any initializer methods). This effectively disallows the use of the attribute on any NSProxy subclass. Please add a designated initializer to NSProxy so that subclasses can take advantage of this attribute.

Steps to Reproduce:
1. Create a new project
2. Create a new subclass of NSProxy
3. Add an initializer and mark it the designated initializer with __attribute__((objc_designated_initializer))

Expected Results:
I am able to call a designated initializer on NSProxy and avoid a compiler warning.

Actual Results:
NSProxy has no designated initializer; I get a compiler warning.

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!