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 5/* { dg-do compile } */ 6 7#include "../objc-obj-c++-shared/TestsuiteObject.h" 8 9@class MyWpModule; 10 11@compatibility_alias MyObject TestsuiteObject; 12@compatibility_alias FictitiousModule MyWpModule; 13 14@protocol MySelTarget 15- (id) meth1; 16@end 17 18@protocol Img 19- (id) meth2; 20@end 21 22@interface FunnyModule: FictitiousModule <Img> /* { dg-error ".MyWpModule., superclass of .FunnyModule." } */ 23- (id) meth2; 24@end 25 26@interface MyProjWpModule : MyWpModule <MySelTarget, Img> /* { dg-error ".MyWpModule., superclass of .MyProjWpModule." } */ { 27 id i1, i2; 28} 29- (id) meth1; 30- (id) meth2; 31@end 32 33@interface AnotherModule: MyObject <MySelTarget> 34- (id) meth1; 35@end 36