Debian Codegraph @

clang/test/SemaObjC/continuation-class-property.m

raw
1 // RUN: %clang_cc1 -fsyntax-only -verify %s
2
3 @protocol Foo
4 @property (readonly, copy) id foos;
5 @end
6
7 @interface Bar <Foo> {
8 }
9
10 @end
11
12 @interface Baz <Foo> {
13 }
14 @end
15
16 @interface Bar ()
17 @property (readwrite, copy) id foos;
18 @end
19
20 @interface Baz ()
21 @property (readwrite, copy) id foos;
22 @end
23
24
25 @class NSString;
26
27 typedef struct {
28 float width;
29 float length;
30 } NSRect;
31
32 @interface MyClass {
33 }
34 @property (readonly) NSRect foo; // expected-note {{property declared here}}
35 @property (readonly, strong) NSString *bar; // expected-note {{property declared here}}
36 @end
37
38 @interface MyClass ()
39 @property (readwrite) NSString *foo; // expected-error {{type of property 'NSString *' in class extension does not match property type in primary class}}
40 @property (readwrite, strong) NSRect bar; // expected-error {{type of property 'NSRect' in class extension does not match property type in primary class}}
41 @end
42
43 struct S;
44 struct S1;
45 @interface STAdKitContext
46 @property (nonatomic, readonly, assign) struct evhttp_request *httpRequest;
47 @property (nonatomic, readonly, assign) struct S *httpRequest2;
48 @property (nonatomic, readonly, assign) struct S1 *httpRequest3;
49 @property (nonatomic, readonly, assign) struct S2 *httpRequest4;
50 @end
51
52 struct evhttp_request;
53 struct S1;
54
55 @interface STAdKitContext()
56 @property (nonatomic, readwrite, assign) struct evhttp_request *httpRequest;
57 @property (nonatomic, readwrite, assign) struct S *httpRequest2;
58 @property (nonatomic, readwrite, assign) struct S1 *httpRequest3;
59 @property (nonatomic, readwrite, assign) struct S2 *httpRequest4;
60 @end
61
62 @protocol ADCameraJSO_Bindings
63 @property (nonatomic, readonly) NSString *currentPictureURI;
64 @end
65
66 @interface ADCameraJSO
67 @end
68
69 @interface ADCameraJSO() <ADCameraJSO_Bindings>
70 @property (nonatomic, copy) NSString *currentPictureURI;
71 @end