Files
kotlin-fork/compiler/testData/codegen/box/functions/localFunctions/kt2895.kt
T
Steven Schäfer 7d59c7689c JVM IR: Avoid direct invokes in callable reference tests
Due to the direct invoke optimization, most callable reference tests
were not generating callable references/lambdas.
2022-07-14 23:24:18 +02:00

16 lines
281 B
Kotlin
Vendored

fun outer() {
fun inner(i: Int) {
if (i > 0){
{
it: Int -> inner(0) // <- invocation of literal itself is generated instead
}.let { it.invoke(1) }
}
}
inner(1)
}
fun box(): String {
outer()
return "OK"
}