[cfe-commits] r170573 - in /cfe/trunk: lib/Sema/SemaObjCProperty.cpp test/SemaObjC/property-category-impl.m

jahanian fjahanian at apple.com
Wed Dec 19 11:23:42 PST 2012


On Dec 19, 2012, at 11:02 AM, Jordan Rose <jordan_rose at apple.com> wrote:

> How about this case?

This case works too (if you are referring to this completed test case):

@protocol Foo
@property (copy) id foo;
@end

@interface FooParent
- (id)foo;
- (void)setFoo:(id)foo;
@end

@interface Foo : FooParent <Foo>
@end

@interface Foo(CAT) <Foo>
@end

@implementation Foo(CAT)
@end

 Category's conforming protocol's property is implemented via setter/getter in its primary class's super class's
implementation. So, no warning.

- Fariborz

> 
>> @protocol Foo
>> @property id foo
>> @end
>> 
>> @interface FooParent
>> - (id)foo;
>> - (void)setFoo:(id)foo;
>> @end
>> 
>> @interface Foo : FooParent <Foo>
>> @end
> 
> (The opposite case should be handled by a property implicitly defining its accessors.)
> Jordan
> 




More information about the cfe-commits mailing list