[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:
committed by
Space Team
parent
bad5c58952
commit
81b591ed21
js/js.translator/testData/incremental/invalidation/localObjectsLeakThroughInterface/lib1/classA.0.kt
Vendored
+6
@@ -0,0 +1,6 @@
|
||||
class ClassA {
|
||||
fun leakObject(): Interface {
|
||||
val obj = object : Interface {}
|
||||
return obj
|
||||
}
|
||||
}
|
||||
js/js.translator/testData/incremental/invalidation/localObjectsLeakThroughInterface/lib1/classA.1.kt
Vendored
+8
@@ -0,0 +1,8 @@
|
||||
class ClassA {
|
||||
fun leakObject(): Interface {
|
||||
val obj = object : Interface {
|
||||
override fun getNumber() = 1
|
||||
}
|
||||
return obj
|
||||
}
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
interface Interface {
|
||||
val extraNumber get() = 0
|
||||
|
||||
fun getNumber() = 0
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
interface Interface {
|
||||
val extraNumber get() = 1
|
||||
|
||||
fun getNumber() = 0
|
||||
|
||||
fun getOtherNumber() = 1
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
interface Interface {
|
||||
val extraNumber get() = 2
|
||||
|
||||
fun getNumber() = 0
|
||||
|
||||
fun getOtherNumber() = 1
|
||||
|
||||
val otherExtraNumber get() = 1
|
||||
}
|
||||
js/js.translator/testData/incremental/invalidation/localObjectsLeakThroughInterface/lib1/module.info
Vendored
+24
@@ -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
|
||||
Reference in New Issue
Block a user