Hi. Why function `f` below doesn't compile, while ...
# announcements
v
Hi. Why function
f
below doesn't compile, while
h
does? Is it because of
@kotlin.internal.InlineOnly
annotation on
let
?
Copy code
inline fun g(block: () -> Unit) = block()

    fun f(): Int {
        g {
            return 123
        }
    } // Error: A 'return' expression is required...

    fun h(): Int {
        null.let {
            return 123
        }
    }
🤔 2