blob: a44ba4f3768dcbf8747f63459e11581169df9a23 [file] [log] [blame]
Daniel Dunbar02022f42009-04-10 21:23:20 +00001// RUN: clang-cc -triple i386-apple-darwin9 -fobjc-gc -fsyntax-only -verify %s
Fariborz Jahanian9bc77b22009-02-27 22:38:11 +00002
3@interface INTF
4{
5 id IVAR;
6 __weak id II;
7 __weak id WID;
8 id ID;
9 __weak INTF* AWEAK;
10 __weak INTF* WI;
11}
12@property (assign) __weak id pweak;
13@property (assign) __weak id WID;
14@property (assign) __strong id not;
15@property (assign) id ID;
16@property (assign) INTF* AWEAK;
17@property (assign) __weak INTF* WI;
18@end
19
20@implementation INTF
21@synthesize pweak=IVAR; // expected-error {{existing ivar 'IVAR' for __weak property 'pweak' must be __weak}}
22@synthesize not=II; // expected-error {{existing ivar 'II' for a __strong property 'not' must be garbage collectable}}
23@synthesize WID;
24@synthesize ID;
25@synthesize AWEAK; // expected-error {{existing ivar 'AWEAK' for a __strong property 'AWEAK' must be garbage collectable}}
26@synthesize WI;
27@end