代码搜索结果
找到约 33,168 项符合
Protocol 的代码
comp-types-11.mm
/* { dg-do compile } */
#include
@protocol Foo
- (id)meth1;
- (id)meth2:(int)arg;
@end
@interface Derived1: Object
@end
@interface Derived2: Object
+ (Derived1 *)new;
@end
id
proto-lossage-6.mm
@class Base;
@protocol _Protocol;
@interface ClassA {
}
-(void) func1:(Base *)inTarget;
@end
int main()
{
ClassA* theA = 0;
Base* myBase = 0;
[theA func1:myBase];
return 0
proto-hier-2.m
/* Test protocol warning. */
/* Contributed by Devang Patel . */
/* { dg-do compile } */
typedef struct objc_object { struct objc_class *class_pointer; } *id;
@protocol Bar
@end
missing-proto-1.m
/* Test for graceful handling of missing protocol declarations. */
/* Author: Ziemowit Laski . */
/* { dg-do compile } */
@interface Foo /* { dg-error "cannot find proto
proto-lossage-3.m
/* Crash due to descriptionFor(Instance|Class)Method applied to
a protocol with no instance/class methods respectively.
Problem report and original fix by richard@brainstorm.co.uk. */
/* { dg-d
proto-lossage-5.m
/* Do not lose references to forward-declared protocols. */
/* { dg-do compile } */
@class MyBaseClass;
@class MyClassThatFails;
@protocol _MyProtocol;
@interface MyClassThatFails
- (MyBaseClass
proto-lossage-6.m
/* { dg-do compile } */
@class Base;
@protocol _Protocol;
@interface ClassA {
}
-(void) func1:(Base *)inTarget;
@end
int main()
{
ClassA* theA = 0;
Base* myBase = 0;
[theA f
proto-lossage-2.m
/* Don't forget to look in protocols if a class (and its superclasses) do not
provide a suitable method. */
/* { dg-do compile } */
#include
@protocol Zot
-(void) zot;
@end
@int
missing-proto-2.m
/* Test for graceful handling of missing protocol declarations. */
/* Author: Ziemowit Laski . */
/* { dg-do compile } */
void *protRef = @protocol(Missing); /* { dg-error "cannot
proto-lossage-1.m
/* Test for situations in which protocol conformance information
may be lost, leading to superfluous warnings. */
/* Author: Ziemowit Laski . */
/* { dg-do compile } */
/* One-