mirror of
https://github.com/dlang/dmd.git
synced 2025-04-26 05:00:16 +03:00
16 lines
287 B
Objective-C
16 lines
287 B
Objective-C
#import <Foundation/Foundation.h>
|
|
|
|
@protocol Foo
|
|
+(int) classMethod:(int)a;
|
|
-(int) instanceMethod:(int)a;
|
|
@end
|
|
|
|
int callFooInstanceMethod(id<Foo> foo, int a)
|
|
{
|
|
return [foo instanceMethod: a];
|
|
}
|
|
|
|
int callFooClassMethod(id<Foo> foo, int a)
|
|
{
|
|
return [[foo class] classMethod: a];
|
|
}
|