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 'initialize' declared here}}
13@end
14
15@interface NSImage (AirPortUI)
16- (void) initialize;
17@end
18
19@interface NSImage()
20- (void) CEMeth; // expected-note {{method 'CEMeth' 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
29
30// rdar://10014946
31typedef char BOOL;
32@interface I
33{
34  BOOL allowsDeleting;
35}
36@property (nonatomic, assign, readwrite) BOOL allowsDeleting;
37@end
38
39@implementation I(CAT)
40- (BOOL) allowsDeleting { return 1; }
41@end
42