// !LANGUAGE: +NewInference +FunctionalInterfaceConversion +SamConversionPerArgument +SamConversionForKotlinFunctions // TARGET_BACKEND: JVM // IGNORE_BACKEND_FIR: JVM_IR // IGNORE_BACKEND: JVM_IR 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 }