2009-12-16 04:14:24 +08:00
|
|
|
// RUN: %clang_cc1 -verify %s
|
2008-05-07 02:14:26 +08:00
|
|
|
|
|
|
|
@interface I
|
|
|
|
{
|
|
|
|
id d1;
|
|
|
|
}
|
|
|
|
@property (readwrite, copy) id d1;
|
|
|
|
@property (readwrite, copy) id d2;
|
|
|
|
@end
|
|
|
|
|
|
|
|
@interface NOW : I
|
2013-02-10 08:16:04 +08:00
|
|
|
@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'}}
|
2009-03-03 23:49:23 +08:00
|
|
|
@property (readwrite, copy) I* d2;
|
2008-05-07 02:14:26 +08:00
|
|
|
@end
|
2013-02-10 08:16:04 +08:00
|
|
|
|
|
|
|
// rdar://13156292
|
|
|
|
typedef signed char BOOL;
|
|
|
|
|
|
|
|
@protocol EKProtocolCalendar
|
|
|
|
@property (nonatomic, readonly) BOOL allowReminders;
|
|
|
|
@property (atomic, readonly) BOOL allowNonatomicProperty; // expected-note {{property declared here}}
|
|
|
|
@end
|
|
|
|
|
|
|
|
@protocol EKProtocolMutableCalendar <EKProtocolCalendar>
|
|
|
|
@end
|
|
|
|
|
|
|
|
@interface EKCalendar
|
|
|
|
@end
|
|
|
|
|
|
|
|
@interface EKCalendar () <EKProtocolMutableCalendar>
|
|
|
|
@property (nonatomic, assign) BOOL allowReminders;
|
2015-12-10 06:57:32 +08:00
|
|
|
@property (nonatomic, assign) BOOL allowNonatomicProperty; // expected-warning {{'atomic' attribute on property 'allowNonatomicProperty' does not match the property inherited from 'EKProtocolCalendar'}}
|
2013-02-10 08:16:04 +08:00
|
|
|
@end
|
2015-12-11 07:02:09 +08:00
|
|
|
|
|
|
|
__attribute__((objc_root_class))
|
|
|
|
@interface A
|
|
|
|
@property (nonatomic, readonly, getter=isAvailable) int available; // expected-note{{property declared here}}
|
|
|
|
@end
|
|
|
|
|
|
|
|
@interface A ()
|
|
|
|
@property (nonatomic, assign, getter=wasAvailable) int available; // expected-warning{{getter name mismatch between property redeclaration ('wasAvailable') and its original declaration ('isAvailable')}}
|
|
|
|
@end
|