111
|
1 /* Bail out gracefully if attempting to derive from a class that has only been
|
|
2 forward-declared (via @class). Conversely, @compatibility_alias declarations
|
|
3 should be traversed to find the @interface. */
|
|
4 /* { dg-do compile } */
|
|
5
|
|
6 #include "../objc-obj-c++-shared/TestsuiteObject.h"
|
|
7
|
|
8 @class MyWpModule;
|
|
9
|
|
10 @compatibility_alias MyObject TestsuiteObject;
|
|
11 @compatibility_alias FictitiousModule MyWpModule;
|
|
12
|
|
13 @protocol MySelTarget
|
|
14 - (id) meth1;
|
|
15 @end
|
|
16
|
|
17 @protocol Img
|
|
18 - (id) meth2;
|
|
19 @end
|
|
20
|
|
21 @interface FunnyModule: FictitiousModule <Img> /* { dg-error ".MyWpModule., superclass of .FunnyModule." } */
|
|
22 - (id) meth2;
|
|
23 @end
|
|
24
|
|
25 @interface MyProjWpModule : MyWpModule <MySelTarget, Img> /* { dg-error ".MyWpModule., superclass of .MyProjWpModule." } */ {
|
|
26 id i1, i2;
|
|
27 }
|
|
28 - (id) meth1;
|
|
29 - (id) meth2;
|
|
30 @end
|
|
31
|
|
32 @interface AnotherModule: MyObject <MySelTarget>
|
|
33 - (id) meth1;
|
|
34 @end
|