Represent Objective-C block pointers in methods as Kotlin functions

Also do some refactoring.
This commit is contained in:
Svyatoslav Scherbina
2017-10-16 17:22:26 +03:00
committed by SvyatoslavScherbina
parent caf6719fc4
commit e8f97b0436
18 changed files with 412 additions and 80 deletions
@@ -8,7 +8,17 @@ fun main(args: Array<String>) {
}
fun run() {
println(
getSupplier(
invoke1(42) { it * 2 }
)!!()
)
val foo = Foo()
val classGetter = getClassGetter(foo)
invoke2 { println(classGetter()) }
foo.hello()
foo.name = "everybody"
foo.helloWithPrinter(object : NSObject(), PrinterProtocol {