1*f4a2713aSLionel Sambuc// Matches 2*f4a2713aSLionel Sambuc@interface I1 { 3*f4a2713aSLionel Sambuc int ivar1; 4*f4a2713aSLionel Sambuc} 5*f4a2713aSLionel Sambuc@end 6*f4a2713aSLionel Sambuc 7*f4a2713aSLionel Sambuc// Matches 8*f4a2713aSLionel Sambuc@interface I2 : I1 { 9*f4a2713aSLionel Sambuc float ivar2; 10*f4a2713aSLionel Sambuc} 11*f4a2713aSLionel Sambuc@end 12*f4a2713aSLionel Sambuc 13*f4a2713aSLionel Sambuc// Ivar mismatch 14*f4a2713aSLionel Sambuc@interface I3 { 15*f4a2713aSLionel Sambuc int ivar1; 16*f4a2713aSLionel Sambuc int ivar2; 17*f4a2713aSLionel Sambuc} 18*f4a2713aSLionel Sambuc@end 19*f4a2713aSLionel Sambuc 20*f4a2713aSLionel Sambuc// Superclass mismatch 21*f4a2713aSLionel Sambuc@interface I4 : I2 { 22*f4a2713aSLionel Sambuc} 23*f4a2713aSLionel Sambuc@end 24*f4a2713aSLionel Sambuc 25*f4a2713aSLionel Sambuc// Methods match 26*f4a2713aSLionel Sambuc@interface I5 27*f4a2713aSLionel Sambuc- (int)foo; 28*f4a2713aSLionel Sambuc+ (float)bar; 29*f4a2713aSLionel Sambuc@end 30*f4a2713aSLionel Sambuc 31*f4a2713aSLionel Sambuc// Method mismatch 32*f4a2713aSLionel Sambuc@interface I6 33*f4a2713aSLionel Sambuc- (int)foo; 34*f4a2713aSLionel Sambuc+ (int)foo; 35*f4a2713aSLionel Sambuc@end 36*f4a2713aSLionel Sambuc 37*f4a2713aSLionel Sambuc// Method mismatch 38*f4a2713aSLionel Sambuc@interface I7 39*f4a2713aSLionel Sambuc- (int)foo; 40*f4a2713aSLionel Sambuc+ (int)bar:(int)x; 41*f4a2713aSLionel Sambuc@end 42*f4a2713aSLionel Sambuc 43*f4a2713aSLionel Sambuc// Method mismatch 44*f4a2713aSLionel Sambuc@interface I8 45*f4a2713aSLionel Sambuc- (int)foo; 46*f4a2713aSLionel Sambuc+ (int)bar:(float)x; 47*f4a2713aSLionel Sambuc@end 48*f4a2713aSLionel Sambuc 49*f4a2713aSLionel Sambuc// Matching protocol 50*f4a2713aSLionel Sambuc@protocol P0 51*f4a2713aSLionel Sambuc+ (int)foo; 52*f4a2713aSLionel Sambuc- (int)bar:(float)x; 53*f4a2713aSLionel Sambuc@end 54*f4a2713aSLionel Sambuc 55*f4a2713aSLionel Sambuc// Protocol with mismatching method 56*f4a2713aSLionel Sambuc@protocol P1 57*f4a2713aSLionel Sambuc+ (int)foo; 58*f4a2713aSLionel Sambuc- (int)bar:(float)x; 59*f4a2713aSLionel Sambuc@end 60*f4a2713aSLionel Sambuc 61*f4a2713aSLionel Sambuc// Interface with protocol 62*f4a2713aSLionel Sambuc@interface I9 <P0> 63*f4a2713aSLionel Sambuc+ (int)foo; 64*f4a2713aSLionel Sambuc- (int)bar:(float)x; 65*f4a2713aSLionel Sambuc@end 66*f4a2713aSLionel Sambuc 67*f4a2713aSLionel Sambuc// Protocol with protocol 68*f4a2713aSLionel Sambuc@protocol P2 <P0> 69*f4a2713aSLionel Sambuc- (float)wibble:(int)a1 second:(int)a2; 70*f4a2713aSLionel Sambuc@end 71*f4a2713aSLionel Sambuc 72*f4a2713aSLionel Sambuc// Forward-declared interfaces 73*f4a2713aSLionel Sambuc@class I10, I11; 74*f4a2713aSLionel Sambuc@interface I12 75*f4a2713aSLionel Sambuc@end 76*f4a2713aSLionel Sambuc 77*f4a2713aSLionel Sambuc// Forward-declared protocols 78*f4a2713aSLionel Sambuc@protocol P3, P5; 79*f4a2713aSLionel Sambuc@protocol P4 80*f4a2713aSLionel Sambuc- (double)honk:(int)a; 81*f4a2713aSLionel Sambuc@end 82*f4a2713aSLionel Sambuc 83*f4a2713aSLionel Sambuc// Interface with implementation 84*f4a2713aSLionel Sambuc@interface I13 85*f4a2713aSLionel Sambuc@end 86*f4a2713aSLionel Sambuc 87*f4a2713aSLionel Sambuc@implementation I13 88*f4a2713aSLionel Sambuc@end 89*f4a2713aSLionel Sambuc 90*f4a2713aSLionel Sambuc@interface I13a 91*f4a2713aSLionel Sambuc@end 92*f4a2713aSLionel Sambuc 93*f4a2713aSLionel Sambuc@implementation I13a 94*f4a2713aSLionel Sambuc@end 95*f4a2713aSLionel Sambuc 96*f4a2713aSLionel Sambuc// Implementation by itself 97*f4a2713aSLionel Sambuc@implementation I14 : I12 98*f4a2713aSLionel Sambuc@end 99*f4a2713aSLionel Sambuc 100*f4a2713aSLionel Sambuc@implementation I15 : I12 101*f4a2713aSLionel Sambuc@end 102*f4a2713aSLionel Sambuc 103*f4a2713aSLionel Sambuc 104