John McCall | 10302c0 | 2010-10-28 02:34:38 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -Wmethod-signatures -fsyntax-only -verify %s |
Fariborz Jahanian | 2574a68 | 2009-05-14 23:52:54 +0000 | [diff] [blame] | 2 | |
| 3 | @protocol NSWindowDelegate @end |
| 4 | |
Fariborz Jahanian | 2574a68 | 2009-05-14 23:52:54 +0000 | [diff] [blame] | 5 | @protocol IBStringsTableWindowDelegate <NSWindowDelegate> |
| 6 | @end |
| 7 | |
David Chisnall | e8a2d4c | 2010-10-25 17:23:52 +0000 | [diff] [blame] | 8 | @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 Jahanian | 2574a68 | 2009-05-14 23:52:54 +0000 | [diff] [blame] | 14 | @interface IBStringsTableWindow : NSWindow {} |
| 15 | @end |
| 16 | |
| 17 | @implementation IBStringsTableWindow |
Fariborz Jahanian | bdaae39 | 2010-10-05 21:02:11 +0000 | [diff] [blame] | 18 | - (void)setDelegate:(id <IBStringsTableWindowDelegate>)delegate { // expected-warning {{conflicting parameter types in implementation of 'setDelegate:'}} |
Fariborz Jahanian | 2574a68 | 2009-05-14 23:52:54 +0000 | [diff] [blame] | 19 | } |
David Chisnall | e8a2d4c | 2010-10-25 17:23:52 +0000 | [diff] [blame] | 20 | - (id <NSWindowDelegate>)delegate { // expected-warning {{conflicting return type in implementation of 'delegate':}} |
Fariborz Jahanian | 2574a68 | 2009-05-14 23:52:54 +0000 | [diff] [blame] | 21 | return 0; |
| 22 | } |
| 23 | @end |