David Chisnall | e8a2d4c | 2010-10-25 17:23:52 +0000 | [diff] [blame^] | 1 | // RUN: %clang_cc1 -fsyntax-only -verify %s |
| 2 | |
| 3 | @interface A |
| 4 | - (id)obj; |
| 5 | - (A*)a; |
| 6 | - (void)takesA: (A*)a; // expected-note {{previous definition is here}} |
| 7 | - (void)takesId: (id)a; // expected-note {{previous definition is here}} |
| 8 | @end |
| 9 | |
| 10 | |
| 11 | @interface B : A |
| 12 | @end |
| 13 | |
| 14 | @implementation B |
| 15 | - (B*)obj {return self;} |
| 16 | - (B*)a { return self;} |
| 17 | - (void)takesA: (B*)a // expected-warning {{conflicting parameter types in implementation of 'takesA:'}} |
| 18 | {} |
| 19 | - (void)takesId: (B*)a // expected-warning {{conflicting parameter types in implementation of 'takesId:'}} |
| 20 | {} |
| 21 | @end |