Home | History | Annotate | Download | only in SemaObjC
      1 // RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s
      2 
      3 @interface Foo
      4 @end
      5 @implementation Foo
      6 @end
      7 
      8 @implementation Foo(Whatever)
      9 +(float)returnsFloat { return 7.0; }
     10 @end
     11 
     12 @interface Foo (MoreStuff)
     13 +(int)returnsInt;
     14 @end
     15 
     16 @implementation Foo (MoreStuff)
     17 +(int)returnsInt {
     18   return 0;
     19 }
     20 
     21 +(void)returnsNothing {
     22 }
     23 -(int)callsReturnsInt {
     24   float f = [Foo returnsFloat]; // GCC doesn't find this method (which is a bug IMHO).
     25   [Foo returnsNothing];
     26   return [Foo returnsInt];
     27 }
     28 @end
     29 
     30 int main() {return 0;}
     31 
     32