Files
kotlin/compiler/testData/codegen/box/funInterface/basicFunInterfaceConversion.kt
2020-01-22 00:12:03 +03:00

13 lines
295 B
Kotlin
Vendored

// !LANGUAGE: +NewInference +FunctionalInterfaceConversion +SamConversionPerArgument +SamConversionForKotlinFunctions
// TARGET_BACKEND: JVM
// IGNORE_BACKEND_FIR: JVM_IR
fun interface Foo {
fun invoke(): String
}
fun foo(f: Foo) = f.invoke()
fun box(): String {
return foo { "OK" }
}