OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [objc.dg/] [super-class-4.m] - Rev 827

Go to most recent revision | Compare with Previous | Blame | View Log

/* 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/Object.h>
 
@class MyWpModule;
 
@compatibility_alias MyObject Object;
@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
 

Go to most recent revision | Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.