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