blob: 9be97ae5c8227ddad0d811d167ab568e94cc3cec [file] [log] [blame]
Patrick Beardb2f68202012-04-06 18:12:22 +00001// RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s
Nuno Lopes9c08f272008-12-27 23:47:34 +00002
Fariborz Jahanian1ac2bc42008-12-06 23:03:39 +00003@protocol P
Fariborz Jahanian13546a82011-10-12 00:00:57 +00004 @property(readonly) int X; // expected-note {{property declared here}}
Fariborz Jahanian1ac2bc42008-12-06 23:03:39 +00005@end
6
7@protocol P1<P>
8 @property (copy) id ID;
9@end
10
11@interface I
12@end
13
14@interface I (Cat) <P>
Steve Naroff184671b2009-03-03 15:49:23 +000015@property float X; // expected-warning {{property type 'float' is incompatible with type 'int' inherited from 'P'}}
Fariborz Jahanian1ac2bc42008-12-06 23:03:39 +000016@end
17
18@interface I (Cat2) <P1>
Fariborz Jahanianb7b25652013-02-10 00:16:04 +000019@property (retain) id ID; // expected-warning {{'copy' attribute on property 'ID' does not match the property inherited from 'P1'}}
Fariborz Jahanian1ac2bc42008-12-06 23:03:39 +000020@end
21
22
Fariborz Jahanian804058e2008-12-22 19:05:31 +000023@interface A
24@property(assign) int categoryProperty;
25@end
26
27// Don't issue warning on unimplemented setter/getter
28// because property is @dynamic.
29@implementation A
30@dynamic categoryProperty;
31@end