• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// RUN: %clang_cc1 -fsyntax-only -verify %s
2
3
4@interface Object
5+ (id) new;
6@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}
37