Files
kotlin-fork/compiler/testData/codegen/boxInline/anonymousObject/capturedLocalFunRef.kt
T
2020-03-28 15:26:19 +03:00

24 lines
365 B
Kotlin
Vendored

// IGNORE_BACKEND: JVM
// IGNORE_BACKEND_MULTI_MODULE: JVM, JVM_IR
// FILE: 1.kt
package test
inline fun <T> myRun(block: () -> T) = block()
// FILE: 2.kt
import test.*
fun box(): String {
val x = myRun {
fun foo() = "OK"
val o = object {
val f = ::foo
fun bar() = f()
}
o
}
return x.bar()
}