interface I {
fun foo()
}
object O : I {
override fun foo() {
println("Foo!!!")
}
}
class C : I by O
fun main(args: Array<String>) {
C().foo() // Foo!!!
}
r
robin
01/26/2017, 8:11 AM
shiraji: I don't know why that shouldn't work. An object is just a a Singleton that behaves just like a regular class instance otherwise.