blob: 4223a747947c3bdf4c9af1d13bf5f1a2b5445cc2 [file] [log] [blame]
Patrick Beardacfbe9e2012-04-06 18:12:22 +00001// RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s
Steve Naroff8edb5732008-09-28 14:55:53 +00002
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
30int main() {return 0;}
31