Represent Objective-C block pointers in methods as Kotlin functions
Also do some refactoring.
This commit is contained in:
committed by
SvyatoslavScherbina
parent
caf6719fc4
commit
e8f97b0436
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user