Steve Naroff | e84a864 | 2008-09-28 14:55:53 +0000 | [diff] [blame] | 1 | // RUN: clang -fsyntax-only -verify %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 | |