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

26 lines
371 B
Kotlin
Vendored

// IGNORE_BACKEND: JVM_IR
// FILE: 1.kt
// FULL_JDK
package test
inline fun doWork(job: ()-> Unit) {
job()
}
// FILE: 2.kt
//NO_CHECK_LAMBDA_INLINING
import test.*
import java.util.concurrent.Executors
fun box() : String {
var result = "fail"
doWork {
val job = { result = "OK" }
Executors.callable(job).call()
}
return result
}