blob: ac8ee9ff8c97f084a990970afbfdb5e71a6f1b23 [file] [log] [blame]
Daniel Dunbard7d5f022009-03-24 02:24:46 +00001// RUN: clang-cc -rewrite-objc %s -o -
Steve Naroff8599e7a2008-12-08 16:43:47 +00002
3@interface Foo {
4 int i;
5 int rrrr;
6 Foo *o;
7}
8@property int i;
9@property(readonly) int rrrr;
10@property int d;
11@property(retain) Foo *o;
12
13- (void)foo;
14@end
15
16@implementation Foo
17@synthesize i;
18@synthesize rrrr;
19@synthesize o;
20
21@dynamic d;
22
23- (void)foo {
24 i = 99;
25}
26
27- (int)bar {
28 return i;
29}
30@end
31
32@interface Bar {
33}
34@end
35
36@implementation Bar
37
38static int func(int i);
39
40- (void)baz {
41 Foo *obj1, *obj2;
42 int i;
43 if (obj1.i == obj2.rrrr)
44 obj1.i = 33;
45 obj1.i = func(obj2.rrrr);
46 obj1.i = obj2.rrrr;
47 obj1.i = (obj2.rrrr);
48 [obj1 setI:[obj2 rrrr]];
49 obj1.i = [obj2 rrrr];
Steve Naroffb619d952008-12-09 12:56:34 +000050 obj1.i = 3 + [obj2 rrrr];
Steve Naroff8599e7a2008-12-08 16:43:47 +000051 i = obj1.o.i;
52 obj1.o.i = 77;
53}
54@end