[JS IR] Take default params into account for calculating an IC hash

^KT-54895 Fixed
This commit is contained in:
Alexander Korepanov
2022-11-10 14:10:19 +01:00
committed by Space Team
parent f7063555ca
commit f4b5f5ff5d
19 changed files with 176 additions and 0 deletions
@@ -0,0 +1,5 @@
class ClassA : InterfaceA {
override fun functionA(x: Int, s: String, b: Boolean?): Int {
return x + s.length + if (b == true) 1 else 0
}
}
@@ -0,0 +1,5 @@
class ClassA : InterfaceA {
override fun functionA(x: Int, s: String, b: Boolean?, i: Int): Int {
return i - 1 + x + s.length + if (b == true) 1 else 0
}
}
@@ -0,0 +1,7 @@
private fun test(setepId: Int, i: InterfaceA): Int {
return i.functionA(setepId, "", false)
}
fun testDefaltParam(setepId: Int): Int {
return test(setepId, ClassA())
}
@@ -0,0 +1,7 @@
private fun test(setepId: Int, i: InterfaceA): Int {
return i.functionA(setepId - 1, "")
}
fun testDefaltParam(setepId: Int): Int {
return test(setepId, ClassA())
}
@@ -0,0 +1,12 @@
private fun test(setepId: Int, i: InterfaceA): Int {
return i.functionA(
x = setepId - 2,
s = "s",
b = false,
i = 2
)
}
fun testDefaltParam(setepId: Int): Int {
return test(setepId, ClassA())
}
@@ -0,0 +1,10 @@
private fun test(setepId: Int, i: InterfaceA): Int {
return i.functionA(
x = 3,
i = 2
)
}
fun testDefaltParam(setepId: Int): Int {
return test(setepId, ClassA())
}
@@ -0,0 +1,34 @@
STEP 0:
dependencies: lib1
modifications:
U : l2.0.kt -> l2.kt
U : l2test.0.kt -> l2test.kt
added file: l2.kt, l2test.kt
STEP 1..2:
dependencies: lib1
updated imports: l2test.kt, l2.kt
STEP 3:
dependencies: lib1
modifications:
U : l2test.3.kt -> l2test.kt
modified ir: l2test.kt
STEP 4:
dependencies: lib1
modifications:
U : l2.4.kt -> l2.kt
modified ir: l2.kt, l2test.kt
STEP 5:
dependencies: lib1
modifications:
U : l2test.5.kt -> l2test.kt
modified ir: l2test.kt
STEP 6:
dependencies: lib1
updated imports: l2.kt, l2test.kt
STEP 7:
dependencies: lib1
modifications:
U : l2test.7.kt -> l2test.kt
modified ir: l2test.kt
STEP 8:
dependencies: lib1