Use nearest Java super qualifier for fields in IR converter

Related to KT-49507
This commit is contained in:
Mikhail Glukhikh
2022-06-15 14:45:59 +02:00
committed by Space
parent 8ae47d4c4d
commit fa914f20a4
7 changed files with 34 additions and 20 deletions
+10
View File
@@ -16,8 +16,18 @@ open class Kotlin2 : Java2() {
fun test1(j: Kotlin2) = j.f
// JVM_IR_TEMPLATES
// @Kotlin2.class:
// 2 GETFIELD Java2.f : I
// JVM_IR_TEMPLATES
// @TestKt.class:
// 2 GETFIELD Java2.f : I
// JVM_TEMPLATES
// @Kotlin2.class:
// 1 GETFIELD Java2.f : I
// JVM_TEMPLATES
// @TestKt.class:
// 1 GETFIELD Java2.f : I
@@ -13,7 +13,7 @@ class C : B {
fun f(): @FlexibleNullability String? {
return eval<@FlexibleNullability String?>(f = local fun <anonymous>(): @FlexibleNullability String? {
return <this>(super<A>).#x
return <this>(super<B>).#x
}
)
}
@@ -13,7 +13,7 @@ class C : B {
fun f(): @FlexibleNullability String? {
return eval<@FlexibleNullability String?>(f = local fun <anonymous>(): @FlexibleNullability String? {
return <this>(super<A>).#x
return <this>(super<B>).#x
}
)
}
@@ -1,6 +1,6 @@
fun foo(movedPaths: MutableList<Couple<FilePath>>) {
movedPaths.forEach<Couple<FilePath>>(action = local fun <anonymous>(it: Couple<FilePath>) {
it(super<Pair>).#second.getName() /*~> Unit */
it(super<Couple>).#second.getName() /*~> Unit */
}
)
}
@@ -1,6 +1,6 @@
fun foo(movedPaths: MutableList<Couple<FilePath>>) {
movedPaths.forEach<Couple<FilePath>>(action = local fun <anonymous>(it: Couple<FilePath>) {
it(super<Pair>).#second /*!! FilePath */.getName() /*~> Unit */
it(super<Couple>).#second /*!! FilePath */.getName() /*~> Unit */
}
)
}