view gcc/testsuite/objc.dg/super-class-4.m @ 158:494b0b89df80 default tip

...
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Mon, 25 May 2020 18:13:55 +0900
parents 04ced10e8804
children
line wrap: on
line source

/* Bail out gracefully if attempting to derive from a class that has only been
   forward-declared (via @class).  Conversely, @compatibility_alias declarations
   should be traversed to find the @interface.  */
/* { dg-do compile } */

#include "../objc-obj-c++-shared/TestsuiteObject.h"

@class MyWpModule;

@compatibility_alias MyObject TestsuiteObject;
@compatibility_alias FictitiousModule MyWpModule;

@protocol MySelTarget
- (id) meth1;
@end

@protocol Img
- (id) meth2;
@end

@interface FunnyModule: FictitiousModule <Img> /* { dg-error ".MyWpModule., superclass of .FunnyModule." } */
- (id) meth2;
@end

@interface MyProjWpModule : MyWpModule <MySelTarget, Img> /* { dg-error ".MyWpModule., superclass of .MyProjWpModule." } */ {
  id i1, i2;
}
- (id) meth1;
- (id) meth2;
@end

@interface AnotherModule: MyObject <MySelTarget>
- (id) meth1;
@end