mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-07 08:31:28 +00:00
22 lines
387 B
Kotlin
Vendored
22 lines
387 B
Kotlin
Vendored
// !LANGUAGE: +NewInference +FunctionalInterfaceConversion +SamConversionPerArgument +SamConversionForKotlinFunctions
|
|
// IGNORE_BACKEND_FIR: JVM_IR
|
|
// SKIP_DCE_DRIVEN
|
|
|
|
|
|
fun interface KRunnable {
|
|
fun invoke()
|
|
}
|
|
|
|
fun test(a: Any?) {
|
|
a as () -> Unit
|
|
KRunnable(a).invoke()
|
|
}
|
|
|
|
fun box(): String {
|
|
var result = "Fail"
|
|
test {
|
|
result = "OK"
|
|
}
|
|
return result
|
|
}
|