blob: 4598aaa79aad73a38bc0aaeddba7025c39c87959 [file] [log] [blame]
Daniel Dunbarb21d6af2008-09-04 04:36:23 +00001// RUN: clang -fnext-runtime --emit-llvm -o %t %s
2
3#include <stdio.h>
4
5@interface Root
6-(id) alloc;
7-(id) init;
8@end
9
10@interface A : Root {
11 int x;
Daniel Dunbar739a36b2008-09-24 18:00:13 +000012 id ob0, ob1, ob2, ob3, ob4;
Daniel Dunbarb21d6af2008-09-04 04:36:23 +000013}
14@property int x;
15@property int y;
16@property int z;
17@property(readonly) int ro;
Daniel Dunbar739a36b2008-09-24 18:00:13 +000018@property(assign) id ob0;
19@property(retain) id ob1;
20@property(copy) id ob2;
21@property(retain, nonatomic) id ob3;
22@property(copy, nonatomic) id ob4;
Daniel Dunbarb21d6af2008-09-04 04:36:23 +000023@end
24
25@implementation A
26@dynamic x;
27@synthesize x;
28@synthesize y = x;
29@synthesize z = x;
30@synthesize ro = x;
Daniel Dunbar739a36b2008-09-24 18:00:13 +000031@synthesize ob0;
32@synthesize ob1;
33@synthesize ob2;
34@synthesize ob3;
35@synthesize ob4;
Daniel Dunbarb21d6af2008-09-04 04:36:23 +000036-(int) y {
37 return x + 1;
38}
39-(void) setZ: (int) arg {
40 x = arg - 1;
41}
42@end
43
44@interface A (Cat)
45@property int dyn;
46@end
47
48@implementation A (Cat)
49-(int) dyn {
50 return 10;
51}
52@end