Properties declared without ownership should be redeclarable in class continuati

Number:rdar://10188718 Date Originated:26-Sep-2011 11:22 PM
Status:Open Resolved:
Product:iPhone SDK [sic] Product Version:5.0 beta 7
Classification:Enhancement Reproducible:Always
26-Sep-2011 11:22 PM Hamish Allan:
Currently, it's only possible to redeclare (in a class continuation) readonly properties as readwrite. If it were possible to redeclare readonly properties with no ownership (i.e. no strong, weak, unsafe_unretained), it would be possible synthesise those properties and yet keep those ownership semantics -- which are, for a readonly property, implementation details -- outside of the public interface.

Steps to Reproduce:
Attempt to redeclare a property originally declared readonly as e.g. (readonly, strong).

Expected Results:
No error.

Actual Results:
Error: illegal redeclaration of property in continuation class 'OLVIconViewCell' (attribute must be 'readwrite', while its primary must be 'readonly')

Sort of (see rdar://problem/9842232)






This is not a solution, but in order to be able to use the QuartzDemo you could just cut de property declaration from and paste that declaration in AppDelegate.h.

so in the m file we have:

@interface AppDelegate() //@property(nonatomic, readwrite, retain) UIWindow window; @property(nonatomic, readwrite, retain) UINavigationController navigationController; @end

and in the h file we have:

@interface AppDelegate : NSObject { IBOutlet UIWindow window; IBOutlet UINavigationController navigationController; }

@property(nonatomic, readwrite, retain) UIWindow *window;


works fine, but I suppose there will be cases when this workaround causes unexpected behavior.

Radar: 11068692

When compiling under Xcode 4.3, the following error occurs in ApDelegate.m:

Illegal redeclaration of property in continuation class 'AppDelegate' (attribute must be 'readwrite', while its primary must be 'readonly')

It sure would be nice if Apple tools were tested against (and worked with) Apple demos. The company is really doing folks like a a great dis-service considering I pay for this privilege.

Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at 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!