2011-07-29 07:19:50 +08:00
|
|
|
// RUN: %clang_cc1 -fsyntax-only -verify %s
|
|
|
|
// rdar://7020493
|
|
|
|
|
|
|
|
@protocol P1
|
|
|
|
@optional
|
|
|
|
- (int) PMeth;
|
|
|
|
@required
|
2012-02-28 06:55:11 +08:00
|
|
|
- (void) : (double) arg; // expected-note {{method ':' declared here}}
|
2011-07-29 07:19:50 +08:00
|
|
|
@end
|
|
|
|
|
|
|
|
@interface NSImage <P1>
|
2012-02-28 06:55:11 +08:00
|
|
|
- (void) initialize; // expected-note {{method 'initialize' declared here}}
|
2011-07-29 07:19:50 +08:00
|
|
|
@end
|
|
|
|
|
|
|
|
@interface NSImage (AirPortUI)
|
|
|
|
- (void) initialize;
|
|
|
|
@end
|
|
|
|
|
|
|
|
@interface NSImage()
|
2012-02-28 06:55:11 +08:00
|
|
|
- (void) CEMeth; // expected-note {{method 'CEMeth' declared here}}
|
2011-07-29 07:19:50 +08:00
|
|
|
@end
|
|
|
|
|
|
|
|
@implementation NSImage (AirPortUI)
|
|
|
|
- (void) initialize {NSImage *p=0; [p initialize]; } // expected-warning {{category is implementing a method which will also be implemented by its primary class}}
|
|
|
|
- (int) PMeth{ return 0; }
|
|
|
|
- (void) : (double) arg{}; // expected-warning {{category is implementing a method which will also be implemented by its primary class}}
|
|
|
|
- (void) CEMeth {}; // expected-warning {{category is implementing a method which will also be implemented by its primary class}}
|
|
|
|
@end
|
2011-08-26 06:58:42 +08:00
|
|
|
|
|
|
|
// rdar://10014946
|
|
|
|
typedef char BOOL;
|
|
|
|
@interface I
|
|
|
|
{
|
|
|
|
BOOL allowsDeleting;
|
|
|
|
}
|
|
|
|
@property (nonatomic, assign, readwrite) BOOL allowsDeleting;
|
|
|
|
@end
|
|
|
|
|
|
|
|
@implementation I(CAT)
|
|
|
|
- (BOOL) allowsDeleting { return 1; }
|
|
|
|
@end
|