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
25
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 ()
41@property (readwrite) NSString *foo; // expected-error {{type of property 'NSString *' in class extension does not match property type in primary class}}
42@property (readwrite, strong) NSRect bar; // expected-error {{type of property 'NSRect' in class extension does not match property type in primary class}}
43@end
44
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
64
65// rdar://15859862
66@protocol ADCameraJSO_Bindings
67@property (nonatomic, readonly) NSString *currentPictureURI;
68@end
69
70@interface ADCameraJSO
71@end
72
73@interface ADCameraJSO()  <ADCameraJSO_Bindings>
74@property (nonatomic, copy) NSString *currentPictureURI;
75@end
76