Fariborz Jahanian | b73e281 | 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 | a4b984d | 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 () |
Fariborz Jahanian | d3c147f | 2011-11-28 18:38:27 +0000 | [diff] [blame] | 41 | @property (readwrite) NSString *foo; // expected-error {{type of property 'NSString *' in continuation class does not match property type in primary class}} |
| 42 | @property (readwrite, strong) NSRect bar; // expected-error {{type of property 'NSRect' in continuation class does not match property type in primary class}} |
Fariborz Jahanian | a4b984d | 2011-09-24 00:56:59 +0000 | [diff] [blame] | 43 | @end |
Fariborz Jahanian | 6b81b0d | 2012-01-17 18:52:07 +0000 | [diff] [blame^] | 44 | |
| 45 | // rdar://10655530 |
| 46 | struct S; |
| 47 | struct S1; |
| 48 | @interface STAdKitContext |
| 49 | @property (nonatomic, readonly, assign) struct evhttp_request *httpRequest; |
| 50 | @property (nonatomic, readonly, assign) struct S *httpRequest2; |
| 51 | @property (nonatomic, readonly, assign) struct S1 *httpRequest3; |
| 52 | @property (nonatomic, readonly, assign) struct S2 *httpRequest4; |
| 53 | @end |
| 54 | |
| 55 | struct evhttp_request; |
| 56 | struct S1; |
| 57 | |
| 58 | @interface STAdKitContext() |
| 59 | @property (nonatomic, readwrite, assign) struct evhttp_request *httpRequest; |
| 60 | @property (nonatomic, readwrite, assign) struct S *httpRequest2; |
| 61 | @property (nonatomic, readwrite, assign) struct S1 *httpRequest3; |
| 62 | @property (nonatomic, readwrite, assign) struct S2 *httpRequest4; |
| 63 | @end |