| 1 |
// RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s |
| 2 |
|
| 3 |
@class NSString; |
| 4 |
|
| 5 |
@protocol MyProtocol |
| 6 |
@property (nonatomic, strong, readonly) NSString *myString; |
| 7 |
@end |
| 8 |
|
| 9 |
@interface MyClass <MyProtocol> |
| 10 |
// Don't warn about this setter: |
| 11 |
@property (nonatomic, strong, setter=setMYString:) NSString *myString; |
| 12 |
|
| 13 |
|
| 14 |
@property (nonatomic, strong, readonly) NSString *overridenInClass; // expected-note {{property declared here}} |
| 15 |
@end |
| 16 |
|
| 17 |
@interface MySubClass: MyClass |
| 18 |
@property (nonatomic, strong, setter=setMYOverride:) NSString *overridenInClass; |
| 19 |
// expected-warning@-1 {{'setter' attribute on property 'overridenInClass' does not match the property inherited from 'MyClass'}} |
| 20 |
@end |