1 | // RUN: %clang_cc1 -triple i386-apple-darwin9 -fsyntax-only -verify -Wno-objc-root-class %s |
2 | |
3 | @interface Subtask |
4 | { |
5 | id _delegate; |
6 | } |
7 | @property(nonatomic,readwrite,assign) id __weak delegate; // expected-error {{unsafe_unretained property 'delegate' may not also be declared __weak}} |
8 | @end |
9 | |
10 | @implementation Subtask |
11 | @synthesize delegate = _delegate; |
12 | @end |
13 | |
14 | |
15 | @interface PVSelectionOverlayView2 |
16 | { |
17 | id __weak _selectionRect; // expected-error {{cannot create __weak reference because the current deployment target does not support weak references}} expected-error {{existing instance variable '_selectionRect' for property 'selectionRect' with assign attribute must be __unsafe_unretained}} |
18 | } |
19 | |
20 | @property(assign) id selectionRect; // expected-note {{property declared here}} |
21 | |
22 | @end |
23 | |
24 | @implementation PVSelectionOverlayView2 |
25 | |
26 | @synthesize selectionRect = _selectionRect; // expected-note {{property synthesized here}} |
27 | @end |
28 | |
29 | |