I have a Kotlin class that extends a Java class.
Kotlin
class MyKotlinClass: MyJavaClass() {
companion object {
const val STATUS_SUB = 1
}
}
Java
public abstract class MyJavaClass {
public static final int STATUS_SUPER = 0
}
How can I access the super class field through the kotlin subclass?
Kotlin
when(status) {
MyKotlinClass.STATUS_SUPER -> something()
MyKotlinClass.STATUS_SUB -> somethingElse()
}
Is this possible? It says "unresolved reference: STATUS_SUPER"
Would it be possible without using MyJavaClass.STATUS_SUPER
?