blob: 53ba6f7e7e32e09c09cb10e2f6ba27051ad371ad [file] [log] [blame]
Daniel Dunbara5728872009-12-15 20:14:24 +00001// RUN: %clang_cc1 %s -fsyntax-only
Steve Naroff075878a2007-10-12 16:15:17 +00002
Steve Naroff075878a2007-10-12 16:15:17 +00003@interface NSObject
4+ alloc;
5- init;
6@end
Steve Naroffb216c882007-10-09 22:01:59 +00007
8struct D {
9 double d;
10};
11
12@interface Foo : NSObject
13
14- method:(int)a;
15- method:(int)a;
16
17@end
18
19@interface Bar : NSObject
20
21- method:(void *)a;
22
23@end
24
25@interface Car : NSObject
26
27- method:(struct D)a;
28
29@end
30
31@interface Zar : NSObject
32
33- method:(float)a;
34
35@end
36
37@interface Rar : NSObject
38
39- method:(float)a;
40
41@end
42
43int main() {
Steve Naroff075878a2007-10-12 16:15:17 +000044 id xx = [[Car alloc] init]; // expected-warning {{incompatible types assigning 'int' to 'id'}}
Steve Naroffb216c882007-10-09 22:01:59 +000045
Steve Naroff3b950172007-10-10 21:53:07 +000046 [xx method:4];
Steve Naroffb216c882007-10-09 22:01:59 +000047}