brintos

brintos / llvm-project-archived public Read only

0
0
Text · 585 B · b34d98f Raw
49 lines · plain
1// RUN: %clang_cc1 %s -fsyntax-only2// FIXME: This test needs needs to be run with -verify3 4@interface NSObject5+ alloc;6- init;7@end8 9struct D {10  double d;11};12 13@interface Foo : NSObject 14 15- method:(int)a;16- method:(int)a;17 18@end19 20@interface Bar : NSObject 21 22- method:(void *)a;23 24@end25 26@interface Car : NSObject 27 28- method:(struct D)a;29 30@end31 32@interface Zar : NSObject 33 34- method:(float)a;35 36@end37 38@interface Rar : NSObject 39 40- method:(float)a;41 42@end43 44int main(void) {45  id xx = [[Car alloc] init]; // expected-warning {{incompatible types assigning 'int' to 'id'}}46 47  [xx method:4];48}49