1 // RUN: %clang_cc1 -fsyntax-only -verify %s 2 // expected-no-diagnostics 3 4 5 @interface Object 6 + (id) new; 7 @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 31 int 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 } 38