Fariborz Jahanian | fefe91e | 2011-07-28 23:19:50 +0000 | [diff] [blame^] | 1 | // RUN: %clang_cc1 -fsyntax-only -verify %s |
| 2 | // rdar://7020493 |
| 3 | |
| 4 | @protocol P1 |
| 5 | @optional |
| 6 | - (int) PMeth; |
| 7 | @required |
| 8 | - (void) : (double) arg; // expected-note {{method declared here}} |
| 9 | @end |
| 10 | |
| 11 | @interface NSImage <P1> |
| 12 | - (void) initialize; // expected-note {{method declared here}} |
| 13 | @end |
| 14 | |
| 15 | @interface NSImage (AirPortUI) |
| 16 | - (void) initialize; |
| 17 | @end |
| 18 | |
| 19 | @interface NSImage() |
| 20 | - (void) CEMeth; // expected-note {{method declared here}} |
| 21 | @end |
| 22 | |
| 23 | @implementation NSImage (AirPortUI) |
| 24 | - (void) initialize {NSImage *p=0; [p initialize]; } // expected-warning {{category is implementing a method which will also be implemented by its primary class}} |
| 25 | - (int) PMeth{ return 0; } |
| 26 | - (void) : (double) arg{}; // expected-warning {{category is implementing a method which will also be implemented by its primary class}} |
| 27 | - (void) CEMeth {}; // expected-warning {{category is implementing a method which will also be implemented by its primary class}} |
| 28 | @end |