| 1 |
// RUN: %clang_cc1 -verify %s |
| 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 |
| 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'}} |
| 13 |
@property (readwrite, copy) I* d2; |
| 14 |
@end |
| 15 |
|
| 16 |
typedef signed char BOOL; |
| 17 |
|
| 18 |
@protocol EKProtocolCalendar |
| 19 |
@property (nonatomic, readonly) BOOL allowReminders; |
| 20 |
@property (atomic, readonly) BOOL allowNonatomicProperty; // expected-note {{property declared here}} |
| 21 |
@end |
| 22 |
|
| 23 |
@protocol EKProtocolMutableCalendar <EKProtocolCalendar> |
| 24 |
@end |
| 25 |
|
| 26 |
@interface EKCalendar |
| 27 |
@end |
| 28 |
|
| 29 |
@interface EKCalendar () <EKProtocolMutableCalendar> |
| 30 |
@property (nonatomic, assign) BOOL allowReminders; |
| 31 |
@property (nonatomic, assign) BOOL allowNonatomicProperty; // expected-warning {{'atomic' attribute on property 'allowNonatomicProperty' does not match the property inherited from 'EKProtocolCalendar'}} |
| 32 |
@end |
| 33 |
|
| 34 |
__attribute__((objc_root_class)) |
| 35 |
@interface A |
| 36 |
@property (nonatomic, readonly, getter=isAvailable) int available; // expected-note{{property declared here}} |
| 37 |
@end |
| 38 |
|
| 39 |
@interface A () |
| 40 |
@property (nonatomic, assign, getter=wasAvailable) int available; // expected-warning{{getter name mismatch between property redeclaration ('wasAvailable') and its original declaration ('isAvailable')}} |
| 41 |
@end |