arekolek
07/26/2018, 6:53 AMinterface Foo {
val bar: Int
fun getBaz(): Int
}
class Spam: Foo {
override fun getBar() = 0
override val baz get() = 0
}
I think what Andrey Breslav means is that to allow Kotlin properties override Java getters, this code would also have to be allowed to compile. I guess that if you look at Kotlin as a standalone language and not just "better Java" it makes sense that this code should not compile (but maybe there is a good reason for it to compile, other than Java interop, that I don't see?)karelpeeters
07/26/2018, 6:50 PM