aboutsummaryrefslogtreecommitdiff
path: root/test/SemaObjC/class-conforming-protocol-2.m
blob: 32305d14e148d08f49594d4e56a30bedec6c4aec (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// RUN: %clang_cc1  -fsyntax-only -verify %s

@protocol NSWindowDelegate @end

@interface NSWindow
- (void)setDelegate:(id <NSWindowDelegate>)anObject; // expected-note {{previous definition is here}}
- (id <NSWindowDelegate>) delegate; // expected-note {{previous definition is here}}
@end

@protocol IBStringsTableWindowDelegate <NSWindowDelegate>
@end

@interface IBStringsTableWindow : NSWindow {}
@end

@implementation IBStringsTableWindow
- (void)setDelegate:(id <IBStringsTableWindowDelegate>)delegate { // expected-warning {{conflicting parameter types in implementation of 'setDelegate:'}}
}
- (id <IBStringsTableWindowDelegate>)delegate { // expected-warning {{conflicting return type in implementation of 'delegate':}}
        return 0;
}
@end