Fariborz Jahanian | b33f3ad | 2009-05-01 20:07:12 +0000 | [diff] [blame] | 1 | // RUN: clang-cc -fsyntax-only -verify %s |
| 2 | |
| 3 | @protocol P |
| 4 | - (void) doSomethingInProtocol: (float) x; // expected-note {{previous definition is here}} |
| 5 | + (void) doSomethingClassyInProtocol: (float) x; // expected-note {{previous definition is here}} |
| 6 | - (void) doNothingInProtocol : (float) x; |
| 7 | + (void) doNothingClassyInProtocol : (float) x; |
| 8 | @end |
| 9 | |
| 10 | @interface I <P> |
| 11 | - (void) doSomething: (float) x; // expected-note {{previous definition is here}} |
| 12 | + (void) doSomethingClassy: (int) x; // expected-note {{previous definition is here}} |
| 13 | @end |
| 14 | |
| 15 | @interface Bar : I |
| 16 | @end |
| 17 | |
| 18 | @implementation Bar |
| 19 | - (void) doSomething: (int) x {} // expected-warning {{conflicting parameter types}} |
| 20 | + (void) doSomethingClassy: (float) x{} // expected-warning {{conflicting parameter types}} |
| 21 | - (void) doSomethingInProtocol: (id) x {} // expected-warning {{conflicting parameter types}} |
| 22 | + (void) doSomethingClassyInProtocol: (id) x {} // expected-warning {{conflicting parameter types}} |
| 23 | @end |
| 24 | |
| 25 | |