robin
02/23/2017, 1:42 PMg
is inline in his example. Actually I've tried to modify let
a little bit, and this example is working:
inline fun <R> let(block: () -> R): R = block()
fun h(): Int {
let {
return 123
}
}
While this one is not:
inline fun let(block: () -> Unit): Unit = block()
fun h(): Int {
let {
return 123
}
}
That doesn't seem right at all.