1 // RUN: %clang_cc1 %s -fsyntax-only 2 // FIXME: This test needs needs to be run with -verify 3 4 @interface NSObject 5 + alloc; 6 - init; 7 @end 8 9 struct D { 10 double d; 11 }; 12 13 @interface Foo : NSObject 14 15 - method:(int)a; 16 - method:(int)a; 17 18 @end 19 20 @interface Bar : NSObject 21 22 - method:(void *)a; 23 24 @end 25 26 @interface Car : NSObject 27 28 - method:(struct D)a; 29 30 @end 31 32 @interface Zar : NSObject 33 34 - method:(float)a; 35 36 @end 37 38 @interface Rar : NSObject 39 40 - method:(float)a; 41 42 @end 43 44 int main() { 45 id xx = [[Car alloc] init]; // expected-warning {{incompatible types assigning 'int' to 'id'}} 46 47 [xx method:4]; 48 } 49