diegog
11/10/2017, 6:28 PMval reportErrorTokenInFace: () -> Unit = {
println("Hey there")
}
fun foo() {
reportErrorTokenInFace().returnToCaller { return@foo }
println("This should not be executed!")
}
inline fun Unit.returnToCaller(handler: () -> Unit) {
println("Return to the calling function")
handler()
}