📄 comp-types-10.m
字号:
/* { 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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -