blob: 32305d14e148d08f49594d4e56a30bedec6c4aec [file] [log] [blame]
Daniel Dunbara5728872009-12-15 20:14:24 +00001// RUN: %clang_cc1 -fsyntax-only -verify %s
Fariborz Jahanian2574a682009-05-14 23:52:54 +00002
3@protocol NSWindowDelegate @end
4
5@interface NSWindow
Fariborz Jahanianbdaae392010-10-05 21:02:11 +00006- (void)setDelegate:(id <NSWindowDelegate>)anObject; // expected-note {{previous definition is here}}
7- (id <NSWindowDelegate>) delegate; // expected-note {{previous definition is here}}
Fariborz Jahanian2574a682009-05-14 23:52:54 +00008@end
9
10@protocol IBStringsTableWindowDelegate <NSWindowDelegate>
11@end
12
13@interface IBStringsTableWindow : NSWindow {}
14@end
15
16@implementation IBStringsTableWindow
Fariborz Jahanianbdaae392010-10-05 21:02:11 +000017- (void)setDelegate:(id <IBStringsTableWindowDelegate>)delegate { // expected-warning {{conflicting parameter types in implementation of 'setDelegate:'}}
Fariborz Jahanian2574a682009-05-14 23:52:54 +000018}
Fariborz Jahanianbdaae392010-10-05 21:02:11 +000019- (id <IBStringsTableWindowDelegate>)delegate { // expected-warning {{conflicting return type in implementation of 'delegate':}}
Fariborz Jahanian2574a682009-05-14 23:52:54 +000020 return 0;
21}
22@end