1 // RUN: %clang_cc1 -fsyntax-only -fobjc-runtime-has-weak -fobjc-arc -verify -Wno-objc-root-class %s
3 @interface WeakPropertyTest {
6 id x; // expected-error {{existing instance variable 'x' for __weak property 'x' must be __weak}}
8 @property (weak) id value1;
9 @property __weak id value;
10 @property () __weak id value2;
12 @property (weak, assign) id v1; // expected-error {{property attributes 'assign' and 'weak' are mutually exclusive}}
13 @property (weak, copy) id v2; // expected-error {{property attributes 'copy' and 'weak' are mutually exclusive}}
14 @property (weak, retain) id v3; // expected-error {{property attributes 'retain' and 'weak' are mutually exclusive}}
15 @property (weak, assign) id v4; // expected-error {{property attributes 'assign' and 'weak' are mutually exclusive}}
17 @property () __weak id x; // expected-note {{property declared here}}
20 @implementation WeakPropertyTest
21 @synthesize x; // expected-note {{property synthesized here}}
22 @dynamic value1, value, value2, v1,v2,v3,v4;