mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-09 00:21:47 +00:00
11 lines
242 B
Kotlin
Vendored
11 lines
242 B
Kotlin
Vendored
// !LANGUAGE: +NewInference +FunctionalInterfaceConversion +SamConversionPerArgument +SamConversionForKotlinFunctions
|
|
|
|
fun interface Foo {
|
|
fun invoke(): String
|
|
}
|
|
|
|
fun foo(f: Foo) = f.invoke()
|
|
|
|
fun box(): String {
|
|
return foo { "OK" }
|
|
} |