blob: 2d042380582e13ed9e5b032c546166a62551ea0d [file] [log] [blame]
Fariborz Jahanian432a8892010-02-12 19:27:33 +00001// 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;
Douglas Gregord4eea832010-04-09 00:35:39 +000054 return pdfView ? pdfView : browserView; // expected-warning {{incompatible pointer types returning 'UIView<NSObject> *' from a function with result type 'UIWebPDFView *'}}
Fariborz Jahanian432a8892010-02-12 19:27:33 +000055}