mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-09 00:21:47 +00:00
19 lines
341 B
Kotlin
19 lines
341 B
Kotlin
var result = ""
|
|
|
|
fun getReceiver() : Int {
|
|
result += "getReceiver->"
|
|
return 1
|
|
}
|
|
|
|
fun getFun(b : Int.(Int)->Unit): Int.(Int)->Unit {
|
|
result += "getFun()->"
|
|
return b
|
|
}
|
|
|
|
fun box(): String {
|
|
getReceiver().(getFun({ result +="End" }))(1)
|
|
|
|
if(result != "getFun()->getReceiver->End") return "fail $result"
|
|
|
|
return "OK"
|
|
} |