Files
kotlin-fork/compiler/testData/codegen/boxInline/anonymousObject/sam.kt
T
2020-03-12 17:22:33 +03:00

21 lines
304 B
Kotlin
Vendored

// TARGET_BACKEND: JVM
// FILE: 1.kt
package test
inline fun <reified T> makeRunnable(noinline lambda: ()->Unit) : Runnable {
return Runnable(lambda)
}
// FILE: 2.kt
import test.*
fun box(): String {
var result = "fail"
makeRunnable<String> { result = "OK" }.run()
return result
}