brintos

brintos / llvm-project-archived public Read only

0
0
Text · 914 B · 51d0fda Raw
55 lines · plain
1// RUN: %clang_cc1 -fsyntax-only -verify %s2 3@protocol NSObject @end4 5@interface NSObject <NSObject> @end6 7@interface UIResponder : NSObject8@end9 10@implementation UIResponder11@end12 13@interface UIView : UIResponder14@end15 16@implementation UIView17@end18 19@interface UIWebTiledView : UIView20@end21 22@implementation UIWebTiledView23@end24 25@interface UIWebDocumentView : UIWebTiledView26@end27 28@implementation UIWebDocumentView29@end30 31@interface UIWebBrowserView : UIWebDocumentView32@end33 34@implementation UIWebBrowserView35@end36 37@interface UIPDFView : UIView38@end39 40@implementation UIPDFView41@end42 43@interface UIWebPDFView : UIPDFView44@end45 46@implementation UIWebPDFView47@end48 49UIWebPDFView *getView(void)50{51    UIWebBrowserView *browserView;52    UIWebPDFView *pdfView;53    return pdfView ? pdfView : browserView; // expected-error {{incompatible pointer types returning 'UIView *' from a function with result type 'UIWebPDFView *'}}54}55