1*f4a2713aSLionel Sambuc// RUN: %clang_cc1 -fsyntax-only -verify %s 2*f4a2713aSLionel Sambuc// radar 7638810 3*f4a2713aSLionel Sambuc 4*f4a2713aSLionel Sambuc@protocol NSObject @end 5*f4a2713aSLionel Sambuc 6*f4a2713aSLionel Sambuc@interface NSObject <NSObject> @end 7*f4a2713aSLionel Sambuc 8*f4a2713aSLionel Sambuc@interface UIResponder : NSObject 9*f4a2713aSLionel Sambuc@end 10*f4a2713aSLionel Sambuc 11*f4a2713aSLionel Sambuc@implementation UIResponder 12*f4a2713aSLionel Sambuc@end 13*f4a2713aSLionel Sambuc 14*f4a2713aSLionel Sambuc@interface UIView : UIResponder 15*f4a2713aSLionel Sambuc@end 16*f4a2713aSLionel Sambuc 17*f4a2713aSLionel Sambuc@implementation UIView 18*f4a2713aSLionel Sambuc@end 19*f4a2713aSLionel Sambuc 20*f4a2713aSLionel Sambuc@interface UIWebTiledView : UIView 21*f4a2713aSLionel Sambuc@end 22*f4a2713aSLionel Sambuc 23*f4a2713aSLionel Sambuc@implementation UIWebTiledView 24*f4a2713aSLionel Sambuc@end 25*f4a2713aSLionel Sambuc 26*f4a2713aSLionel Sambuc@interface UIWebDocumentView : UIWebTiledView 27*f4a2713aSLionel Sambuc@end 28*f4a2713aSLionel Sambuc 29*f4a2713aSLionel Sambuc@implementation UIWebDocumentView 30*f4a2713aSLionel Sambuc@end 31*f4a2713aSLionel Sambuc 32*f4a2713aSLionel Sambuc@interface UIWebBrowserView : UIWebDocumentView 33*f4a2713aSLionel Sambuc@end 34*f4a2713aSLionel Sambuc 35*f4a2713aSLionel Sambuc@implementation UIWebBrowserView 36*f4a2713aSLionel Sambuc@end 37*f4a2713aSLionel Sambuc 38*f4a2713aSLionel Sambuc@interface UIPDFView : UIView 39*f4a2713aSLionel Sambuc@end 40*f4a2713aSLionel Sambuc 41*f4a2713aSLionel Sambuc@implementation UIPDFView 42*f4a2713aSLionel Sambuc@end 43*f4a2713aSLionel Sambuc 44*f4a2713aSLionel Sambuc@interface UIWebPDFView : UIPDFView 45*f4a2713aSLionel Sambuc@end 46*f4a2713aSLionel Sambuc 47*f4a2713aSLionel Sambuc@implementation UIWebPDFView 48*f4a2713aSLionel Sambuc@end 49*f4a2713aSLionel Sambuc 50*f4a2713aSLionel SambucUIWebPDFView *getView() 51*f4a2713aSLionel Sambuc{ 52*f4a2713aSLionel Sambuc UIWebBrowserView *browserView; 53*f4a2713aSLionel Sambuc UIWebPDFView *pdfView; 54*f4a2713aSLionel Sambuc return pdfView ? pdfView : browserView; // expected-warning {{incompatible pointer types returning 'UIView<NSObject> *' from a function with result type 'UIWebPDFView *'}} 55*f4a2713aSLionel Sambuc} 56