| 1 |
// RUN: %clang_cc1 -fsyntax-only -verify %s |
| 2 |
|
| 3 |
@protocol P1 |
| 4 |
@optional |
| 5 |
- (int) PMeth; |
| 6 |
@required |
| 7 |
- (void) : (double) arg; // expected-note {{method ':' declared here}} |
| 8 |
@end |
| 9 |
|
| 10 |
@interface NSImage <P1> |
| 11 |
- (void) initialize; // expected-note {{method 'initialize' declared here}} |
| 12 |
@end |
| 13 |
|
| 14 |
@interface NSImage (AirPortUI) |
| 15 |
- (void) initialize; |
| 16 |
@end |
| 17 |
|
| 18 |
@interface NSImage() |
| 19 |
- (void) CEMeth; // expected-note {{method 'CEMeth' declared here}} |
| 20 |
@end |
| 21 |
|
| 22 |
@implementation NSImage (AirPortUI) |
| 23 |
- (void) initialize {NSImage *p=0; [p initialize]; } // expected-warning {{category is implementing a method which will also be implemented by its primary class}} |
| 24 |
- (int) PMeth{ return 0; } |
| 25 |
- (void) : (double) arg{}; // expected-warning {{category is implementing a method which will also be implemented by its primary class}} |
| 26 |
- (void) CEMeth {}; // expected-warning {{category is implementing a method which will also be implemented by its primary class}} |
| 27 |
@end |
| 28 |
|
| 29 |
typedef char BOOL; |
| 30 |
@interface I |
| 31 |
{ |
| 32 |
BOOL allowsDeleting; |
| 33 |
} |
| 34 |
@property (nonatomic, assign, readwrite) BOOL allowsDeleting; |
| 35 |
@end |
| 36 |
|
| 37 |
@implementation I(CAT) |
| 38 |
- (BOOL) allowsDeleting { return 1; } |
| 39 |
@end |