xref: /minix3/external/bsd/llvm/dist/clang/test/SemaObjC/class-conforming-protocol-2.m (revision f4a2713ac843a11c696ec80c0a5e3e5d80b4d338)
1*f4a2713aSLionel Sambuc// RUN: %clang_cc1 -Wmethod-signatures -fsyntax-only -verify %s
2*f4a2713aSLionel Sambuc
3*f4a2713aSLionel Sambuc@protocol NSWindowDelegate @end
4*f4a2713aSLionel Sambuc
5*f4a2713aSLionel Sambuc@protocol IBStringsTableWindowDelegate <NSWindowDelegate>
6*f4a2713aSLionel Sambuc@end
7*f4a2713aSLionel Sambuc
8*f4a2713aSLionel Sambuc@interface NSWindow
9*f4a2713aSLionel Sambuc- (void)setDelegate:(id <NSWindowDelegate>)anObject; // expected-note {{previous definition is here}}
10*f4a2713aSLionel Sambuc- (id <IBStringsTableWindowDelegate>) delegate; // expected-note {{previous definition is here}}
11*f4a2713aSLionel Sambuc@end
12*f4a2713aSLionel Sambuc
13*f4a2713aSLionel Sambuc
14*f4a2713aSLionel Sambuc@interface IBStringsTableWindow : NSWindow {}
15*f4a2713aSLionel Sambuc@end
16*f4a2713aSLionel Sambuc
17*f4a2713aSLionel Sambuc@implementation IBStringsTableWindow
18*f4a2713aSLionel Sambuc- (void)setDelegate:(id <IBStringsTableWindowDelegate>)delegate { // expected-warning {{conflicting parameter types in implementation of 'setDelegate:'}}
19*f4a2713aSLionel Sambuc}
20*f4a2713aSLionel Sambuc- (id <NSWindowDelegate>)delegate { // expected-warning {{conflicting return type in implementation of 'delegate':}}
21*f4a2713aSLionel Sambuc        return 0;
22*f4a2713aSLionel Sambuc}
23*f4a2713aSLionel Sambuc@end
24