1 // RUN: %clang_cc1 -fsyntax-only -verify %s
3 @protocol NSObject @end
5 @interface NSObject <NSObject> @end
7 @interface UIResponder : NSObject
10 @implementation UIResponder
13 @interface UIView : UIResponder
16 @implementation UIView
19 @interface UIWebTiledView : UIView
22 @implementation UIWebTiledView
25 @interface UIWebDocumentView : UIWebTiledView
28 @implementation UIWebDocumentView
31 @interface UIWebBrowserView : UIWebDocumentView
34 @implementation UIWebBrowserView
37 @interface UIPDFView : UIView
40 @implementation UIPDFView
43 @interface UIWebPDFView : UIPDFView
46 @implementation UIWebPDFView
49 UIWebPDFView *getView(void)
51 UIWebBrowserView *browserView;
52 UIWebPDFView *pdfView;
53 return pdfView ? pdfView : browserView; // expected-warning {{incompatible pointer types returning 'UIView *' from a function with result type 'UIWebPDFView *'}}