mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-08 15:53:19 +00:00
16 lines
221 B
Kotlin
Vendored
16 lines
221 B
Kotlin
Vendored
// !LANGUAGE: +FunctionalInterfaceConversion
|
|
|
|
fun interface Foo {
|
|
fun invoke(): String
|
|
}
|
|
|
|
class A : Foo {
|
|
override fun invoke(): String {
|
|
return "OK"
|
|
}
|
|
}
|
|
|
|
fun box(): String {
|
|
return A().invoke()
|
|
}
|