linux下编程用
编译软件
源代码在线查看: super-class-4.m
/* 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 @class MyWpModule; @compatibility_alias MyObject Object; @compatibility_alias FictitiousModule MyWpModule; @protocol MySelTarget - (id) meth1; @end @protocol Img - (id) meth2; @end @interface FunnyModule: FictitiousModule /* { dg-error ".MyWpModule., superclass of .FunnyModule." } */ - (id) meth2; @end @interface MyProjWpModule : MyWpModule /* { dg-error ".MyWpModule., superclass of .MyProjWpModule." } */ { id i1, i2; } - (id) meth1; - (id) meth2; @end @interface AnotherModule: MyObject - (id) meth1; @end