Fariborz Jahanian | 8e356bf | 2010-01-06 21:38:30 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -fsyntax-only -verify %s |
| 2 | // radar 7509234 |
| 3 | |
| 4 | @protocol Foo |
| 5 | @property (readonly, copy) id foos; |
| 6 | @end |
| 7 | |
| 8 | @interface Bar <Foo> { |
| 9 | } |
| 10 | |
| 11 | @end |
| 12 | |
| 13 | @interface Baz <Foo> { |
| 14 | } |
| 15 | @end |
| 16 | |
| 17 | @interface Bar () |
| 18 | @property (readwrite, copy) id foos; |
| 19 | @end |
| 20 | |
| 21 | @interface Baz () |
| 22 | @property (readwrite, copy) id foos; |
| 23 | @end |
| 24 | |
Fariborz Jahanian | 11ee283 | 2011-09-24 00:56:59 +0000 | [diff] [blame^] | 25 | |
| 26 | // rdar://10142679 |
| 27 | @class NSString; |
| 28 | |
| 29 | typedef struct { |
| 30 | float width; |
| 31 | float length; |
| 32 | } NSRect; |
| 33 | |
| 34 | @interface MyClass { |
| 35 | } |
| 36 | @property (readonly) NSRect foo; // expected-note {{property declared here}} |
| 37 | @property (readonly, strong) NSString *bar; // expected-note {{property declared here}} |
| 38 | @end |
| 39 | |
| 40 | @interface MyClass () |
| 41 | @property (readwrite) NSString *foo; // expected-error {{type of property 'NSString *' in continuation class does not matchproperty type in primary class}} |
| 42 | @property (readwrite, strong) NSRect bar; // expected-error {{type of property 'NSRect' in continuation class does not matchproperty type in primary class}} |
| 43 | @end |