1 // RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s
2 // expected-no-diagnostics
4 /* This test is for categories which don't implement the accessors but some accessors are
5 implemented in their base class implementation. In this case,no warning must be issued.
12 @property(readonly) int foo;
15 @implementation MyClass
16 - (int) foo { return _foo; }
19 @interface MyClass (private)
20 @property(readwrite) int foo;
23 @implementation MyClass (private)
24 - (void) setFoo:(int)foo { _foo = foo; }
27 @interface MyClass (public)
28 @property(readwrite) int foo;
31 @implementation MyClass (public)
34 // No warn of unimplemented property of protocols in category,
35 // when those properties will be implemented in category's primary
36 // class or one of its super classes.
37 @interface HBSuperclass
38 @property (nonatomic) char myProperty;
39 @property (nonatomic) char myProperty2;
42 @interface HBClass : HBSuperclass
46 @property (nonatomic) char myProperty;
47 @property (nonatomic) char myProperty2;
50 @interface HBSuperclass (HBSCategory)<HBProtocol>
53 @implementation HBSuperclass (HBSCategory)
56 @interface HBClass (HBCategory)<HBProtocol>
59 @implementation HBClass (HBCategory)