106 lines · plain
1// Matches2@interface I1 {3 int ivar1;4}5@end6 7// Matches8@interface I2 : I1 {9 float ivar2;10}11@end12 13// Ivar mismatch14@interface I3 {15 int ivar1;16 int ivar2;17}18@end19 20// Superclass mismatch21@interface I4 : I2 {22}23@end24 25// Methods match26@interface I527- (int)foo;28+ (float)bar;29@end30 31// Method mismatch32@interface I633- (int)foo;34+ (int)foo;35@end36 37// Method mismatch38@interface I739- (int)foo;40+ (int)bar:(int)x;41@end42 43// Method mismatch44@interface I845- (int)foo;46+ (int)bar:(float)x;47@end48 49// Matching protocol50@protocol P051+ (int)foo;52- (int)bar:(float)x;53@end54 55// Protocol with mismatching method56@protocol P157+ (int)foo;58- (int)bar:(float)x;59@end60 61// Interface with protocol62@interface I9 <P0>63+ (int)foo;64- (int)bar:(float)x;65@end66 67// Protocol with protocol68@protocol P2 <P0>69- (float)wibble:(int)a1 second:(int)a2;70@end71 72// Forward-declared interfaces73@class I10, I11;74@interface I1275@end76 77// Forward-declared protocols78@protocol P3, P5;79@protocol P480- (double)honk:(int)a;81@end82 83// Interface with implementation84@interface I1385@end86 87@implementation I1388@end89 90@interface I13a91@end92 93@implementation I13a94@end95 96// Implementation by itself97@implementation I14 : I1298@end99 100@implementation I15 : I12101@end102 103@interface ImportSelectorSLoc { }104-(int)addInt:(int)a toInt:(int)b moduloInt:(int)c; // don't crash here105@end106