blob: a3bd0b1d2398fa2aef7bfc26ea5936e4ec782e8e [file] [log] [blame]
John McCall10302c02010-10-28 02:34:38 +00001// RUN: %clang_cc1 -Wmethod-signatures -fsyntax-only -verify %s
Fariborz Jahanian2574a682009-05-14 23:52:54 +00002
3@protocol NSWindowDelegate @end
4
Fariborz Jahanian2574a682009-05-14 23:52:54 +00005@protocol IBStringsTableWindowDelegate <NSWindowDelegate>
6@end
7
David Chisnalle8a2d4c2010-10-25 17:23:52 +00008@interface NSWindow
9- (void)setDelegate:(id <NSWindowDelegate>)anObject; // expected-note {{previous definition is here}}
10- (id <IBStringsTableWindowDelegate>) delegate; // expected-note {{previous definition is here}}
11@end
12
13
Fariborz Jahanian2574a682009-05-14 23:52:54 +000014@interface IBStringsTableWindow : NSWindow {}
15@end
16
17@implementation IBStringsTableWindow
Fariborz Jahanianbdaae392010-10-05 21:02:11 +000018- (void)setDelegate:(id <IBStringsTableWindowDelegate>)delegate { // expected-warning {{conflicting parameter types in implementation of 'setDelegate:'}}
Fariborz Jahanian2574a682009-05-14 23:52:54 +000019}
David Chisnalle8a2d4c2010-10-25 17:23:52 +000020- (id <NSWindowDelegate>)delegate { // expected-warning {{conflicting return type in implementation of 'delegate':}}
Fariborz Jahanian2574a682009-05-14 23:52:54 +000021 return 0;
22}
23@end