mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-16 15:53:55 +00:00
25 lines
345 B
Kotlin
Vendored
25 lines
345 B
Kotlin
Vendored
// 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
|
|
}
|