Patrick Beard | b2f6820 | 2012-04-06 18:12:22 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s |
Nuno Lopes | 9c08f27 | 2008-12-27 23:47:34 +0000 | [diff] [blame] | 2 | |
Fariborz Jahanian | 1ac2bc4 | 2008-12-06 23:03:39 +0000 | [diff] [blame] | 3 | @protocol P |
Fariborz Jahanian | 13546a8 | 2011-10-12 00:00:57 +0000 | [diff] [blame] | 4 | @property(readonly) int X; // expected-note {{property declared here}} |
Fariborz Jahanian | 1ac2bc4 | 2008-12-06 23:03:39 +0000 | [diff] [blame] | 5 | @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 Naroff | 184671b | 2009-03-03 15:49:23 +0000 | [diff] [blame] | 15 | @property float X; // expected-warning {{property type 'float' is incompatible with type 'int' inherited from 'P'}} |
Fariborz Jahanian | 1ac2bc4 | 2008-12-06 23:03:39 +0000 | [diff] [blame] | 16 | @end |
| 17 | |
| 18 | @interface I (Cat2) <P1> |
Fariborz Jahanian | b7b2565 | 2013-02-10 00:16:04 +0000 | [diff] [blame] | 19 | @property (retain) id ID; // expected-warning {{'copy' attribute on property 'ID' does not match the property inherited from 'P1'}} |
Fariborz Jahanian | 1ac2bc4 | 2008-12-06 23:03:39 +0000 | [diff] [blame] | 20 | @end |
| 21 | |
| 22 | |
Fariborz Jahanian | 804058e | 2008-12-22 19:05:31 +0000 | [diff] [blame] | 23 | @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 |