blob: 7c30f79ceaecd4ce1034296cf459b03376df28e5 [file] [log] [blame]
// RUN: clang-cc %s -fsyntax-only
@interface NSObject
+ alloc;
- init;
@end
struct D {
double d;
};
@interface Foo : NSObject
- method:(int)a;
- method:(int)a;
@end
@interface Bar : NSObject
- method:(void *)a;
@end
@interface Car : NSObject
- method:(struct D)a;
@end
@interface Zar : NSObject
- method:(float)a;
@end
@interface Rar : NSObject
- method:(float)a;
@end
int main() {
id xx = [[Car alloc] init]; // expected-warning {{incompatible types assigning 'int' to 'id'}}
[xx method:4];
}