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

36 lines
515 B
Kotlin
Vendored

// NO_CHECK_LAMBDA_INLINING
// FILE: 1.kt
package test
class A {
val foo = fun(call: () -> Unit) =
ext {
fun send() {
call()
}
bar {
send()
}
}
fun bar(body: () -> Unit) {
body()
}
inline fun A.ext(init: X.() -> Unit) {
return X().init()
}
class X
}
// FILE: 2.kt
import test.*
fun box(): String {
var result = "fail"
A().foo { result = "OK" }
return result
}