Files
kotlin-fork/compiler/testData/codegen/bytecodeText/javaFields.kt
T
Mikhail Glukhikh b0a6508d4b Handle Java base class field read properly in IR converters
For FE 1.0, we just change super qualifier symbol to
base class, if it's possible.
For FIR, we introduce using of super qualifier symbols for
field accesses and repeat FE 1.0 behavior here.

#KT-49507 Fixed
2022-06-16 06:51:33 +00:00

23 lines
343 B
Kotlin
Vendored

// FILE: Java1.java
public class Java1 {
public int f;
}
// FILE: Java2.java
public class Java2 extends Kotlin1 {
}
// FILE: test.kt
open class Kotlin1 : Java1()
open class Kotlin2 : Java2() {
fun getF() = super.f
}
fun test1(j: Kotlin2) = j.f
// @Kotlin2.class:
// 1 GETFIELD Java2.f : I
// @TestKt.class:
// 1 GETFIELD Java2.f : I