2009-12-15 23:14:24 +03:00
|
|
|
// RUN: %clang_cc1 -fsyntax-only -verify %s
|
2008-11-25 01:16:00 +03:00
|
|
|
|
|
|
|
|
|
|
|
@interface Object
|
2009-03-04 18:11:40 +03:00
|
|
|
+ (id) new;
|
2008-11-25 01:16:00 +03:00
|
|
|
@end
|
|
|
|
|
|
|
|
@protocol GCObject
|
|
|
|
@property int class;
|
|
|
|
@end
|
|
|
|
|
|
|
|
@protocol DerivedGCObject <GCObject>
|
|
|
|
@property int Dclass;
|
|
|
|
@end
|
|
|
|
|
|
|
|
@interface GCObject : Object <DerivedGCObject> {
|
|
|
|
int ifield;
|
|
|
|
int iOwnClass;
|
|
|
|
int iDclass;
|
|
|
|
}
|
|
|
|
@property int OwnClass;
|
|
|
|
@end
|
|
|
|
|
|
|
|
@implementation GCObject : Object
|
|
|
|
@synthesize class=ifield;
|
|
|
|
@synthesize Dclass=iDclass;
|
|
|
|
@synthesize OwnClass=iOwnClass;
|
|
|
|
@end
|
|
|
|
|
|
|
|
int main(int argc, char **argv) {
|
|
|
|
GCObject *f = [GCObject new];
|
|
|
|
f.class = 5;
|
|
|
|
f.Dclass = 1;
|
|
|
|
f.OwnClass = 3;
|
|
|
|
return f.class + f.Dclass + f.OwnClass - 9;
|
|
|
|
}
|