blob: 3fabac07a3802654df1f237144148edb6853b3fb [file] [log] [blame]
John McCallf85e1932011-06-15 23:02:42 +00001// RUN: %clang_cc1 -fsyntax-only -fobjc-nonfragile-abi -fobjc-arc -verify %s
2// rdar://8899430
3
4@interface WeakPropertyTest {
5 Class isa;
6 __weak id value;
7 id x;
8}
9@property (weak) id value1;
10@property __weak id value;
11@property () __weak id value2;
12
13@property (weak, assign) id v1; // expected-error {{property attributes 'assign' and 'weak' are mutually exclusive}}
14@property (weak, copy) id v2; // expected-error {{property attributes 'copy' and 'weak' are mutually exclusive}}
15@property (weak, retain) id v3; // expected-error {{property attributes 'retain' and 'weak' are mutually exclusive}}
16@property (weak, assign) id v4; // expected-error {{property attributes 'assign' and 'weak' are mutually exclusive}}
17
18@property () __weak id x; // expected-note {{property declared here}}
19@end
20
21@implementation WeakPropertyTest
22@synthesize x; // expected-error {{existing ivar 'x' for __weak property 'x' must be __weak}}
23@dynamic value1, value, value2, v1,v2,v3,v4;
24@end