blob: f08a5a97d8b78e138cd4b8e82c552fdbc6c757d9 [file] [log] [blame]
Fariborz Jahanianfefe91e2011-07-28 23:19:50 +00001// 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
Fariborz Jahanian8c7e67d2011-08-25 22:58:42 +000029
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