Setup overridability rules for properties built on Java fields

- They overrides each other
- They do not overrides Kotlin propeties and vice versa
This commit is contained in:
Denis Zharkov
2015-10-02 16:17:40 +03:00
parent dfe93406d9
commit a02b64f0e3
9 changed files with 182 additions and 0 deletions
@@ -0,0 +1,19 @@
// FILE: B.java
abstract class B implements A {
private int size = 1;
}
// FILE: main.kt
interface A {
val size: Int
}
class C : B() {
override val size: Int get() = 1
}
fun foo() {
C().size
}