https://kotlinlang.org logo
#announcements
Title
# announcements
r

robin

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