blob: 9c94c78a8717b3b50bdfcbb64f4fd6d9cda7fdab [file] [log] [blame]
Daniel Dunbard7d5f022009-03-24 02:24:46 +00001// RUN: clang-cc -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