mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-03-10 08:31:29 +00:00
17 lines
304 B
Kotlin
Vendored
17 lines
304 B
Kotlin
Vendored
interface IFn {
|
|
operator fun invoke(): String
|
|
}
|
|
|
|
abstract class Base(val fn: IFn)
|
|
|
|
interface Host {
|
|
companion object : Base(
|
|
object : IFn {
|
|
override fun invoke(): String = Host.ok()
|
|
}
|
|
) {
|
|
fun ok() = "OK"
|
|
}
|
|
}
|
|
|
|
fun box() = Host.Companion.fn() |