Files
kotlin-fork/compiler/testData/codegen/boxInline/localFunInLambda/localFunInLambdaCapturesAnotherFun.kt
T
Denis Zharkov e16b0524b6 Fix inline codegen on local functions inside inlined lambda
The problem was that anonymous classes wasn't regenerated
although they capture another anonymous class that is a subject
for regeneration

 #KT-8689 Fixed
2017-02-17 13:48:19 +03:00

27 lines
336 B
Kotlin
Vendored

// FILE: 1.kt
package test
public inline fun myRun(block: () -> Unit) {
return block()
}
// FILE: 2.kt
//NO_CHECK_LAMBDA_INLINING
import test.*
fun box(): String {
var res = ""
myRun {
fun f1() {
res = "OK"
}
fun f2() {
f1()
}
f2()
}
return res
}