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