Which lines are printed when the trailing lambda is passed?

from Lambda expressions
Kotlin 2.4.10 intermediate 2 min

Which lines are printed when the trailing lambda is passed?

kotlin
fun load(
    onSuccess: () -> Unit = { println("default success") },
    onFailure: () -> Unit = { println("default failure") },
) {
    onSuccess()
    onFailure()
}

fun main() {
    load { println("custom") }
}
Open in playground
Report an error