brintos

brintos / llvm-project-archived public Read only

0
0
Text · 775 B · a3bd0b1 Raw
24 lines · plain
1// RUN: %clang_cc1 -Wmethod-signatures -fsyntax-only -verify %s2 3@protocol NSWindowDelegate @end4 5@protocol IBStringsTableWindowDelegate <NSWindowDelegate>6@end7 8@interface NSWindow9- (void)setDelegate:(id <NSWindowDelegate>)anObject; // expected-note {{previous definition is here}}10- (id <IBStringsTableWindowDelegate>) delegate; // expected-note {{previous definition is here}}11@end12 13 14@interface IBStringsTableWindow : NSWindow {}15@end16 17@implementation IBStringsTableWindow18- (void)setDelegate:(id <IBStringsTableWindowDelegate>)delegate { // expected-warning {{conflicting parameter types in implementation of 'setDelegate:'}}19}20- (id <NSWindowDelegate>)delegate { // expected-warning {{conflicting return type in implementation of 'delegate':}}21        return 0;22}23@end24