Files
kotlin-fork/compiler/testData/codegen/box/funInterface/basicFunInterfaceConversion.kt
T
2020-05-13 11:28:48 +03:00

12 lines
261 B
Kotlin
Vendored

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