Files
kotlin-fork/compiler/testData/codegen/box/javaFieldAndKotlinProperty/javaFieldAndKotlinPrivateProperty.kt
T
2023-12-26 10:18:19 +00:00

20 lines
400 B
Kotlin
Vendored

// TARGET_BACKEND: JVM_IR
// Note: works accidentally via backing field access
// Field VS property: case 4.2
// More or less duplicates the case in KT-34943/KT-54393
// JVM_ABI_K1_K2_DIFF: KT-62483
// FILE: BaseJava.java
public class BaseJava {
public String a = "FAIL";
}
// FILE: Derived.kt
class Derived : BaseJava() {
private val a = "OK"
fun x() = a
}
fun box() = Derived().x()