mirror of
https://github.com/dlang/dmd.git
synced 2025-04-26 13:10:12 +03:00
20 lines
344 B
Objective-C
20 lines
344 B
Objective-C
#import <Foundation/Foundation.h>
|
|
|
|
@interface Foo : NSObject
|
|
+(int) classMethod:(int)a;
|
|
-(int) instanceMethod:(int)a;
|
|
@end
|
|
|
|
int callFooInstanceMethod(int a)
|
|
{
|
|
Foo* foo = [[Foo alloc] init];
|
|
int result = [foo instanceMethod:a];
|
|
[foo release];
|
|
|
|
return result;
|
|
}
|
|
|
|
int callFooClassMethod(int a)
|
|
{
|
|
return [Foo classMethod: a];
|
|
}
|