1 // RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s 2 // expected-no-diagnostics 3 4 typedef struct objc_class *Class; 5 6 struct objc_class { 7 Class isa; 8 }; 9 10 typedef struct objc_object { 11 Class isa; 12 } *id; 13 14 @interface XCActivityLogSection 15 + (unsigned)serializationFormatVersion; 16 + (unsigned)sectionByDeserializingData; 17 + (Class)retursClass; 18 @end 19 20 @implementation XCActivityLogSection 21 22 + (unsigned)serializationFormatVersion 23 { 24 25 return 0; 26 } 27 + (unsigned)sectionByDeserializingData { 28 unsigned version; 29 return self.serializationFormatVersion; 30 } 31 32 + (Class)retursClass { 33 Class version; 34 // FIXIT. (*version).isa does not work. Results in compiler error. 35 return version->isa; 36 } 37 38 @end 39 40 41