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