Accessors of property 'delegate' were already synthesized with instance variable 'delegate_'
I'm using AppCode and it flagged an interesting situation in the code of a very large project. Pre-ARC.
A subclass defines and synthesizes a property called delegate. Actually the property declaration had been commented out! But the @synthesize delegate = delegate_; statement was left behind.
The code compiles, presumably because the base class defines and synthesizes a property also called delegate and synthesizes it with a backing variable with the same name: @synthesize delegate = delegate_;
My question is: What happens with a message is sent to the delegate in a) the base class methods and b) in the sub-class methods.
AppCode flags the synthesize statement in the sub-class as an error:
Accessors of property 'delegate' were already synthesized with instance variable 'delegate_'
请先登录再写评论。