Files
kotlin-fork/compiler/testData/codegen/boxInline/localFunInLambda/lambdaInLambdaCapturesAnotherFun.kt
T
2018-06-28 12:26:41 +02:00

29 lines
373 B
Kotlin
Vendored

// IGNORE_BACKEND: JVM_IR
// 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"
}
val x: () -> Unit = {
f1()
}
x()
}
return res
}