| 1 | // RUN: %clang_cc1 -triple i386-apple-darwin9 -fsyntax-only -verify %s |
| 2 | |
| 3 | @interface A |
| 4 | @end |
| 5 | |
| 6 | // Readonly, atomic public redeclaration of property in subclass. |
| 7 | @interface AtomicInheritanceSuper |
| 8 | @property (readonly) A *property; |
| 9 | @end |
| 10 | |
| 11 | @interface AtomicInheritanceSuper() |
| 12 | @property (nonatomic,readwrite,retain) A *property; |
| 13 | @end |
| 14 | |
| 15 | @interface AtomicInheritanceSub : AtomicInheritanceSuper |
| 16 | @property (readonly) A *property; |
| 17 | @end |
| 18 | |
| 19 | // Readonly, atomic public redeclaration of property in subclass. |
| 20 | @interface AtomicInheritanceSuper2 |
| 21 | @property (readonly) A *property; |
| 22 | @end |
| 23 | |
| 24 | @interface AtomicInheritanceSub2 : AtomicInheritanceSuper2 |
| 25 | @property (nonatomic, readwrite, retain) A *property; |
| 26 | @end |
| 27 | |
| 28 | @interface ReadonlyAtomic |
| 29 | @property (readonly, nonatomic) A *property; |
| 30 | @end |
| 31 | |
| 32 | @interface ReadonlyAtomic () |
| 33 | @property (readwrite) A *property; |
| 34 | @end |
| 35 | |
| 36 | // Readonly, atomic public redeclaration of property in subclass. |
| 37 | @interface AtomicInheritanceSuper3 |
| 38 | @property (readonly,atomic) A *property; // expected-note{{property declared here}} |
| 39 | @end |
| 40 | |
| 41 | @interface AtomicInheritanceSuper3() |
| 42 | @property (nonatomic,readwrite,retain) A *property; // expected-warning{{'atomic' attribute on property 'property' does not match the property inherited from 'AtomicInheritanceSuper3'}} |
| 43 | @end |
| 44 | |
| 45 | @interface AtomicInheritanceSub3 : AtomicInheritanceSuper3 |
| 46 | @property (readonly) A *property; |
| 47 | @end |
| 48 | |
| 49 | // Readonly, atomic public redeclaration of property in subclass. |
| 50 | @interface AtomicInheritanceSuper4 |
| 51 | @property (readonly, atomic) A *property; // expected-note{{property declared here}} |
| 52 | @end |
| 53 | |
| 54 | @interface AtomicInheritanceSub4 : AtomicInheritanceSuper4 |
| 55 | @property (nonatomic, readwrite, retain) A *property; // expected-warning{{atomic' attribute on property 'property' does not match the property inherited from 'AtomicInheritanceSuper4'}} |
| 56 | @end |
| 57 | |
| 58 | |