101 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 float ivar2;17}18@end19 20// Superclass mismatch21@interface I4 : I1 {22}23@end24 25// Methods match26@interface I527+ (float)bar;28- (int)foo;29@end30 31// Method mismatch32@interface I633+ (float)foo;34@end35 36// Method mismatch37@interface I738- (int)foo;39+ (int)bar:(float)x;40@end41 42// Method mismatch43@interface I844- (int)foo;45+ (int)bar:(float)x, ...;46@end47 48// Matching protocol49@protocol P050+ (int)foo;51- (int)bar:(float)x;52@end53 54// Protocol with mismatching method55@protocol P156+ (int)foo;57- (int)bar:(double)x;58@end59 60// Interface with protocol61@interface I9 <P0>62+ (int)foo;63- (int)bar:(float)x;64@end65 66// Protocol with protocol67@protocol P2 <P0>68- (float)wibble:(int)a1 second:(int)a2;69@end70 71// Forward-declared interface72@class I10; @interface I12 @end73@interface I1174@end75 76// Forward-declared protocols77@protocol P3, P4;78@protocol P579- (double)honk:(int)a;80@end81 82// Interface with implementation83@interface I1384@end85 86@implementation I1387@end88 89@interface I13b90@end91 92@implementation I13b93@end94 95// Implementation by itself96@implementation I14 : I1297@end98 99@implementation I15 : I11100@end101