1*f4a2713aSLionel Sambuc// RUN: %clang_cc1 -fsyntax-only -verify %s 2*f4a2713aSLionel Sambuc// expected-no-diagnostics 3*f4a2713aSLionel Sambuc 4*f4a2713aSLionel Sambuc@protocol P0 5*f4a2713aSLionel Sambuc-bar; 6*f4a2713aSLionel Sambuc@end 7*f4a2713aSLionel Sambuc 8*f4a2713aSLionel Sambuc@interface A <P0> 9*f4a2713aSLionel Sambuc@end 10*f4a2713aSLionel Sambuc 11*f4a2713aSLionel Sambuc// Interface conforms to inherited protocol 12*f4a2713aSLionel Sambuc 13*f4a2713aSLionel Sambuc@interface B0 : A <P0> 14*f4a2713aSLionel Sambuc@end 15*f4a2713aSLionel Sambuc 16*f4a2713aSLionel Sambuc@implementation B0 17*f4a2713aSLionel Sambuc@end 18*f4a2713aSLionel Sambuc 19*f4a2713aSLionel Sambuc// Interface conforms to a protocol which extends another. The other 20*f4a2713aSLionel Sambuc// protocol is inherited, and extended methods are implemented. 21*f4a2713aSLionel Sambuc 22*f4a2713aSLionel Sambuc@protocol P1 <P0> 23*f4a2713aSLionel Sambuc-foo; 24*f4a2713aSLionel Sambuc@end 25*f4a2713aSLionel Sambuc 26*f4a2713aSLionel Sambuc@interface B1 : A <P1> 27*f4a2713aSLionel Sambuc@end 28*f4a2713aSLionel Sambuc 29*f4a2713aSLionel Sambuc@implementation B1 30*f4a2713aSLionel Sambuc-foo { return 0; }; 31*f4a2713aSLionel Sambuc@end 32*f4a2713aSLionel Sambuc 33*f4a2713aSLionel Sambuc// Interface conforms to a protocol whose methods are provided by an 34*f4a2713aSLionel Sambuc// alternate inherited protocol. 35*f4a2713aSLionel Sambuc 36*f4a2713aSLionel Sambuc@protocol P2 37*f4a2713aSLionel Sambuc-bar; 38*f4a2713aSLionel Sambuc@end 39*f4a2713aSLionel Sambuc 40*f4a2713aSLionel Sambuc@interface B2 : A <P2> 41*f4a2713aSLionel Sambuc@end 42*f4a2713aSLionel Sambuc 43*f4a2713aSLionel Sambuc@implementation B2 44*f4a2713aSLionel Sambuc@end 45*f4a2713aSLionel Sambuc 46*f4a2713aSLionel Sambuc// Interface conforms to a protocol whose methods are provided by a base class. 47*f4a2713aSLionel Sambuc 48*f4a2713aSLionel Sambuc@interface A1 49*f4a2713aSLionel Sambuc-bar; 50*f4a2713aSLionel Sambuc@end 51*f4a2713aSLionel Sambuc 52*f4a2713aSLionel Sambuc@interface B3 : A1 <P2> 53*f4a2713aSLionel Sambuc@end 54*f4a2713aSLionel Sambuc 55*f4a2713aSLionel Sambuc@implementation B3 56*f4a2713aSLionel Sambuc@end 57*f4a2713aSLionel Sambuc 58