mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-08 15:53:19 +00:00
13 lines
301 B
Kotlin
Vendored
13 lines
301 B
Kotlin
Vendored
// !LANGUAGE: +NewInference +FunctionalInterfaceConversion +SamConversionPerArgument +SamConversionForKotlinFunctions
|
|
// IGNORE_BACKEND_FIR: JVM_IR
|
|
// IGNORE_BACKEND: JS, JS_IR
|
|
|
|
fun interface Foo {
|
|
fun invoke(): String
|
|
}
|
|
|
|
fun foo(f: Foo) = f.invoke()
|
|
|
|
fun box(): String {
|
|
return foo { "OK" }
|
|
} |