Files
kotlin-fork/backend.native/tests/interop/objc/smoke.h
T
Svyatoslav Scherbina 79455c5161 Support interop modularity
* Add list of included headers into the manifest
* Implement importing "foreign" type declarations
* Implement forward declarations more natively in the compiler
* Represent Objective-C categories as Kotlin extension methods and
  properties

Also:
* Do some refactoring in stub generation
* Call bridges directly in stubs for Objective-C properties
2017-09-14 16:47:26 +03:00

28 lines
514 B
Objective-C

#import <objc/NSObject.h>
@protocol Printer
@required
-(void)print:(const char*)string;
@end;
@interface Foo : NSObject
@property NSString* name;
-(void)helloWithPrinter:(id <Printer>)printer;
@end;
@interface Foo (FooExtensions)
-(void)hello;
@end;
@protocol MutablePair
@required
@property (readonly) int first;
@property (readonly) int second;
-(void)update:(int)index add:(int)delta;
-(void)update:(int)index sub:(int)delta;
@end;
void replacePairElements(id <MutablePair> pair, int first, int second);