Files
kotlin-fork/compiler/testData/codegen/box/funInterface/basicFunInterfaceConversion.kt
T
2021-10-02 06:14:35 +00:00

13 lines
303 B
Kotlin
Vendored

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