Files
kotlin/compiler/testData/codegen/box/funInterface/basicFunInterfaceConversion.kt
2020-02-17 12:21:00 +03:00

14 lines
313 B
Kotlin
Vendored

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