comp-types-11.mm

来自「Mac OS X 10.4.9 for x86 Source Code gcc」· MM 代码 · 共 31 行

MM
31
字号
/* APPLE LOCAL file mainline *//* { dg-do compile } */#include <objc/Object.h>@protocol Foo- (id)meth1;- (id)meth2:(int)arg;@end@interface Derived1: Object@end@interface Derived2: Object+ (Derived1 *)new;@endid<Foo> func(void) {  Object *o = [Object new];  return o;  /* { dg-warning "class .Object. does not implement the .Foo. protocol" } */}@implementation Derived2+ (Derived1 *)new {  Derived2 *o = [super new];  return o;  /* { dg-warning "distinct Objective\\-C type in return" } */}@end

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?