| 1 |
// RUN: %clang_cc1 -fsyntax-only -verify %s |
| 2 |
|
| 3 |
@protocol NSObject @end |
| 4 |
|
| 5 |
@interface NSObject <NSObject> @end |
| 6 |
|
| 7 |
@interface UIResponder : NSObject |
| 8 |
@end |
| 9 |
|
| 10 |
@implementation UIResponder |
| 11 |
@end |
| 12 |
|
| 13 |
@interface UIView : UIResponder |
| 14 |
@end |
| 15 |
|
| 16 |
@implementation UIView |
| 17 |
@end |
| 18 |
|
| 19 |
@interface UIWebTiledView : UIView |
| 20 |
@end |
| 21 |
|
| 22 |
@implementation UIWebTiledView |
| 23 |
@end |
| 24 |
|
| 25 |
@interface UIWebDocumentView : UIWebTiledView |
| 26 |
@end |
| 27 |
|
| 28 |
@implementation UIWebDocumentView |
| 29 |
@end |
| 30 |
|
| 31 |
@interface UIWebBrowserView : UIWebDocumentView |
| 32 |
@end |
| 33 |
|
| 34 |
@implementation UIWebBrowserView |
| 35 |
@end |
| 36 |
|
| 37 |
@interface UIPDFView : UIView |
| 38 |
@end |
| 39 |
|
| 40 |
@implementation UIPDFView |
| 41 |
@end |
| 42 |
|
| 43 |
@interface UIWebPDFView : UIPDFView |
| 44 |
@end |
| 45 |
|
| 46 |
@implementation UIWebPDFView |
| 47 |
@end |
| 48 |
|
| 49 |
UIWebPDFView *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 |
} |