[JS IR] Add IC test for interface with default implementation

This commit is contained in:
Alexander Korepanov
2023-05-01 10:53:03 +02:00
committed by Space Team
parent 180613e1c6
commit 9da9c95105
18 changed files with 119 additions and 0 deletions
@@ -0,0 +1,15 @@
fun box(stepId: Int): String {
val expected = when (stepId) {
0 -> 10
1 -> 13
2 -> 16
else -> return "Unknown"
}
val x = test()
if (expected != x) {
return "Fail $expected != $x"
}
return "OK"
}
@@ -0,0 +1,13 @@
STEP 0:
dependencies: lib1, lib2
modifications:
U : test.0.kt -> test.kt
added file: m.kt, test.kt
STEP 1:
dependencies: lib1, lib2
updated imports: test.kt
STEP 2:
dependencies: lib1, lib2
modifications:
U : test.2.kt -> test.kt
modified ir: test.kt
@@ -0,0 +1,7 @@
fun test(): Int {
val a = getObjectA()
val b = getObjectB()
val c = getObjectC()
return a.testA1() + b.testA1() + b.testB1() + c.testA1() + c.testB1() + c.testC1()
}
@@ -0,0 +1,9 @@
fun test(): Int {
val a = getObjectA()
val b = getObjectB()
val c = getObjectC()
return a.testA1() + a.testA2() +
b.testA1() + b.testA2() + b.testB1() +
c.testA1() + c.testA2() + c.testB1() + c.testC1()
}