Files
kotlin-fork/compiler/testData/codegen/boxInline/anonymousObject/objectInLambdaCapturesAnotherObject.kt
T
2021-02-02 17:53:52 +03:00

28 lines
391 B
Kotlin
Vendored

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