1 // RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s
3 @interface IDELogNavigator
9 @interface IDELogNavigator (CAT)
10 @property (readwrite, retain) id selectedObjects; // expected-note {{property declared here}}
11 @property (readwrite, retain) id d_selectedObjects; // expected-note {{property declared here}}
14 @implementation IDELogNavigator
15 @synthesize selectedObjects = _selectedObjects; // expected-error {{property declared in category 'CAT' cannot be implemented in class implementation}}
16 @dynamic d_selectedObjects; // expected-error {{property declared in category 'CAT' cannot be implemented in class implementation}}
25 @property (readonly) int count;
29 @interface NSArray(Additions) <MyCountable>
32 @implementation NSArray(Additions)
40 @interface NSArray1 <NSProtocol>
43 @interface NSArray1(Additions) <MyCountable>
46 @implementation NSArray1(Additions)
50 @interface Super <NSProtocol>
53 @interface NSArray2 : Super @end
55 @interface NSArray2(Additions) <MyCountable>
58 @implementation NSArray2(Additions)
62 @interface Super1 <NSProtocol>
63 @property (readonly) int count;
66 @protocol MyCountable1
69 @interface NSArray3 : Super1 <MyCountable1>
72 @implementation NSArray3
84 @implementation I(CAT)
95 @interface C (Category)
96 @property (readonly) int p; // no warning for this property - a getter is declared in another category
97 @property (readonly) int p1; // expected-note {{property declared here}}
98 @property (readonly) int p2; // no warning for this property - a getter is declared in this category
102 @implementation C (Category) // expected-warning {{property 'p1' requires method 'p1' to be defined - use @dynamic or provide a method implementation in this category}}
107 @property (readonly) float anotherFloat; // expected-note {{property declared here}}
108 @property (readonly) float Float; // no warning for this property - a getter is declared in this protocol
113 { float anotherFloat; }
116 @interface MyObject (CAT) <MyProtocol>
119 @implementation MyObject (CAT) // expected-warning {{property 'anotherFloat' requires method 'anotherFloat' to be defined - use @dynamic or provide a method implementation in this category}}