Files
kotlin/compiler/testData/codegen/boxInline/anonymousObject/kt15751.kt
Mikhael Bogdanov f7ce8c18c6 Add tests for Obsolete issues
#KT-18977 Obsolete
2019-01-09 10:20:54 +01:00

35 lines
514 B
Kotlin
Vendored

// FILE: 1.kt
// NO_CHECK_LAMBDA_INLINING
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
}