blob: 7d95424a06c840ea029a523d3b097f29aaaa1f22 [file] [log] [blame]
Fariborz Jahanianb73e2812010-01-06 21:38:30 +00001// 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 Jahaniana4b984d2011-09-24 00:56:59 +000025
26// rdar://10142679
27@class NSString;
28
29typedef 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 Jahaniand3c147f2011-11-28 18:38:27 +000041@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 Jahaniana4b984d2011-09-24 00:56:59 +000043@end
Fariborz Jahanian6b81b0d2012-01-17 18:52:07 +000044
45// rdar://10655530
46struct S;
47struct 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
55struct evhttp_request;
56struct 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