Daniel Dunbar | a572887 | 2009-12-15 20:14:24 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -verify %s |
Fariborz Jahanian | daa0311 | 2008-05-06 18:14:26 +0000 | [diff] [blame] | 2 | |
| 3 | @interface I |
| 4 | { |
| 5 | id d1; |
| 6 | } |
| 7 | @property (readwrite, copy) id d1; |
| 8 | @property (readwrite, copy) id d2; |
| 9 | @end |
| 10 | |
| 11 | @interface NOW : I |
Fariborz Jahanian | b7b2565 | 2013-02-10 00:16:04 +0000 | [diff] [blame] | 12 | @property (readonly) id d1; // expected-warning {{attribute 'readonly' of property 'd1' restricts attribute 'readwrite' of property inherited from 'I'}} expected-warning {{'copy' attribute on property 'd1' does not match the property inherited from 'I'}} |
Steve Naroff | 184671b | 2009-03-03 15:49:23 +0000 | [diff] [blame] | 13 | @property (readwrite, copy) I* d2; |
Fariborz Jahanian | daa0311 | 2008-05-06 18:14:26 +0000 | [diff] [blame] | 14 | @end |
Fariborz Jahanian | b7b2565 | 2013-02-10 00:16:04 +0000 | [diff] [blame] | 15 | |
| 16 | // rdar://13156292 |
| 17 | typedef signed char BOOL; |
| 18 | |
| 19 | @protocol EKProtocolCalendar |
| 20 | @property (nonatomic, readonly) BOOL allowReminders; |
| 21 | @property (atomic, readonly) BOOL allowNonatomicProperty; // expected-note {{property declared here}} |
| 22 | @end |
| 23 | |
| 24 | @protocol EKProtocolMutableCalendar <EKProtocolCalendar> |
| 25 | @end |
| 26 | |
| 27 | @interface EKCalendar |
| 28 | @end |
| 29 | |
| 30 | @interface EKCalendar () <EKProtocolMutableCalendar> |
| 31 | @property (nonatomic, assign) BOOL allowReminders; |
| 32 | @property (nonatomic, assign) BOOL allowNonatomicProperty; // expected-warning {{'atomic' attribute on property 'allowNonatomicProperty' does not match the property inherited from 'EKProtocolCalendar'}} |
| 33 | @end |