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}}
27 @property (readonly) int count;
31 @interface NSArray(Additions) <MyCountable>
34 @implementation NSArray(Additions)
42 @interface NSArray1 <NSProtocol>
45 @interface NSArray1(Additions) <MyCountable>
48 @implementation NSArray1(Additions)
52 @interface Super <NSProtocol>
55 @interface NSArray2 : Super @end
57 @interface NSArray2(Additions) <MyCountable>
60 @implementation NSArray2(Additions)
64 @interface Super1 <NSProtocol>
65 @property (readonly) int count;
68 @protocol MyCountable1
71 @interface NSArray3 : Super1 <MyCountable1>
74 @implementation NSArray3
86 @implementation I(CAT)
97 @interface C (Category)
98 @property (readonly) int p; // no warning for this property - a getter is declared in another category
99 @property (readonly) int p1; // expected-note {{property declared here}}
100 @property (readonly) int p2; // no warning for this property - a getter is declared in this category
104 @implementation C (Category) // expected-warning {{property 'p1' requires method 'p1' to be defined - use @dynamic or provide a method implementation in this category}}
109 @property (readonly) float anotherFloat; // expected-note {{property declared here}}
110 @property (readonly) float Float; // no warning for this property - a getter is declared in this protocol
115 { float anotherFloat; }
118 @interface MyObject (CAT) <MyProtocol>
121 @implementation MyObject (CAT) // expected-warning {{property 'anotherFloat' requires method 'anotherFloat' to be defined - use @dynamic or provide a method implementation in this category}}