1 // RUN: %clang_cc1 -fsyntax-only -verify %s 2 // expected-no-diagnostics 3 4 @interface Test {} 5 + (Test*)one; 6 - (int)two; 7 @end 8 9 int main () 10 { 11 return Test.one.two; 12 } 13 14 // rdar://16650575 15 __attribute__((objc_root_class)) 16 @interface RootClass { 17 Class isa; 18 } 19 20 @property int property; 21 -(int)method; 22 - (void) setMethod : (int)arg; 23 +(int)classMethod; 24 @end 25 26 @interface Subclass : RootClass @end 27 void Test1() { 28 // now okay 29 (void)RootClass.property; 30 (void)Subclass.property; 31 (void)RootClass.method; 32 (void)Subclass.method; 33 34 RootClass.property = 1; 35 Subclass.property = 2; 36 RootClass.method = 3; 37 Subclass.method = 4; 38 39 // okay 40 (void)RootClass.classMethod; 41 (void)Subclass.classMethod; 42 43 // also okay 44 (void)[RootClass property]; 45 (void)[Subclass property]; 46 [RootClass method]; 47 [Subclass method]; 48 [RootClass classMethod]; 49 [Subclass classMethod]; 50 51 // also okay 52 [RootClass setProperty : 1]; 53 [Subclass setProperty : 2]; 54 [RootClass setMethod : 3]; 55 [Subclass setMethod : 4]; 56 } 57