[JS IR IC] Interface default implementations affect IC hash

Adding or removing a method or property with
a default implementation to an interface should
invalidate all children: we must regenerate JS code for them

^KT-56237 Fixed
This commit is contained in:
Alexander Korepanov
2023-04-25 14:53:34 +02:00
committed by Space Team
parent bad5c58952
commit 81b591ed21
45 changed files with 391 additions and 70 deletions
@@ -0,0 +1,6 @@
class ClassA {
fun leakObject(): Interface {
val obj = object : Interface {}
return obj
}
}
@@ -0,0 +1,8 @@
class ClassA {
fun leakObject(): Interface {
val obj = object : Interface {
override fun getNumber() = 1
}
return obj
}
}
@@ -0,0 +1,5 @@
interface Interface {
val extraNumber get() = 0
fun getNumber() = 0
}
@@ -0,0 +1,7 @@
interface Interface {
val extraNumber get() = 1
fun getNumber() = 0
fun getOtherNumber() = 1
}
@@ -0,0 +1,9 @@
interface Interface {
val extraNumber get() = 2
fun getNumber() = 0
fun getOtherNumber() = 1
val otherExtraNumber get() = 1
}
@@ -0,0 +1,24 @@
STEP 0:
modifications:
U : classA.0.kt -> classA.kt
U : interface.0.kt -> interface.kt
added file: classA.kt, interface.kt
STEP 1:
modifications:
U : classA.1.kt -> classA.kt
modified ir: classA.kt
STEP 2:
modifications:
U : interface.2.kt -> interface.kt
modified ir: interface.kt
updated exports: interface.kt
updated imports: classA.kt
STEP 3:
STEP 4:
modifications:
U : interface.4.kt -> interface.kt
modified ir: interface.kt
updated exports: interface.kt
updated imports: classA.kt
STEP 5:
updated exports: interface.kt