blob: 629889c3ad557c265ed9d8ea49af10ce4f6a7535 [file] [log] [blame]
David Chisnalle8a2d4c2010-10-25 17:23:52 +00001// RUN: %clang_cc1 -fsyntax-only -verify %s
2
3@interface A
4- (id)obj;
5- (A*)a;
6- (void)takesA: (A*)a; // expected-note {{previous definition is here}}
7- (void)takesId: (id)a; // expected-note {{previous definition is here}}
8@end
9
10
11@interface B : A
12@end
13
14@implementation B
15- (B*)obj {return self;}
16- (B*)a { return self;}
17- (void)takesA: (B*)a // expected-warning {{conflicting parameter types in implementation of 'takesA:'}}
18{}
19- (void)takesId: (B*)a // expected-warning {{conflicting parameter types in implementation of 'takesId:'}}
20{}
21@end