blob: 71bb86a301effd46bbbef1eefb108ae271415e3b [file] [log] [blame]
Daniel Dunbara5728872009-12-15 20:14:24 +00001// RUN: %clang_cc1 -fsyntax-only -verify %s
Fariborz Jahaniane793a6e2008-11-24 22:16:00 +00002
3
4@interface Object
Steve Naroff6b9dfd42009-03-04 15:11:40 +00005+ (id) new;
Fariborz Jahaniane793a6e2008-11-24 22:16:00 +00006@end
7
8@protocol GCObject
9@property int class;
10@end
11
12@protocol DerivedGCObject <GCObject>
13@property int Dclass;
14@end
15
16@interface GCObject : Object <DerivedGCObject> {
17 int ifield;
18 int iOwnClass;
19 int iDclass;
20}
21@property int OwnClass;
22@end
23
24@implementation GCObject : Object
25@synthesize class=ifield;
26@synthesize Dclass=iDclass;
27@synthesize OwnClass=iOwnClass;
28@end
29
30int main(int argc, char **argv) {
31 GCObject *f = [GCObject new];
32 f.class = 5;
33 f.Dclass = 1;
34 f.OwnClass = 3;
35 return f.class + f.Dclass + f.OwnClass - 9;
36}