2010-10-28 10:34:38 +08:00
|
|
|
// RUN: %clang_cc1 -Wmethod-signatures -fsyntax-only -verify %s
|
2009-05-15 07:52:54 +08:00
|
|
|
|
|
|
|
@protocol NSWindowDelegate @end
|
|
|
|
|
2010-10-26 01:23:52 +08:00
|
|
|
@protocol IBStringsTableWindowDelegate <NSWindowDelegate>
|
|
|
|
@end
|
|
|
|
|
2009-05-15 07:52:54 +08:00
|
|
|
@interface NSWindow
|
2010-10-06 05:02:11 +08:00
|
|
|
- (void)setDelegate:(id <NSWindowDelegate>)anObject; // expected-note {{previous definition is here}}
|
2010-10-26 01:23:52 +08:00
|
|
|
- (id <IBStringsTableWindowDelegate>) delegate; // expected-note {{previous definition is here}}
|
2009-05-15 07:52:54 +08:00
|
|
|
@end
|
|
|
|
|
|
|
|
|
|
|
|
@interface IBStringsTableWindow : NSWindow {}
|
|
|
|
@end
|
|
|
|
|
|
|
|
@implementation IBStringsTableWindow
|
2010-10-06 05:02:11 +08:00
|
|
|
- (void)setDelegate:(id <IBStringsTableWindowDelegate>)delegate { // expected-warning {{conflicting parameter types in implementation of 'setDelegate:'}}
|
2009-05-15 07:52:54 +08:00
|
|
|
}
|
2010-10-26 01:23:52 +08:00
|
|
|
- (id <NSWindowDelegate>)delegate { // expected-warning {{conflicting return type in implementation of 'delegate':}}
|
2009-05-15 07:52:54 +08:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
@end
|