[JS IR] Don't check an interface method default impl during JS translation

We do not need to check a default implementation of the interface during
 the translation to JS because it must be checked before.

 Moreover, this check breaks the produced JS code
 if IR is partial loaded, e.g. during the incremental rebuild.

^KT-55716 Fixed
This commit is contained in:
Alexander Korepanov
2023-01-02 16:47:07 +01:00
committed by Space Team
parent 155777e3fa
commit 5f10e605a9
20 changed files with 281 additions and 2 deletions
@@ -0,0 +1,7 @@
fun box(stepId: Int): String {
val x = test()
if (x != stepId) {
return "Fail: $x != $stepId"
}
return "OK"
}
@@ -0,0 +1,39 @@
STEP 0:
dependencies: lib1
modifications:
U : test.0.kt -> test.kt
added file: m.kt, test.kt
STEP 1:
dependencies: lib1
modifications:
U : test.1.kt -> test.kt
modified ir: test.kt
STEP 2:
dependencies: lib1
STEP 3:
dependencies: lib1
updated imports: test.kt
STEP 4:
dependencies: lib1
STEP 5:
dependencies: lib1
modifications:
U : test.5.kt -> test.kt
modified ir: test.kt
STEP 6:
dependencies: lib1
STEP 7:
dependencies: lib1
updated imports: test.kt
STEP 8:
dependencies: lib1
STEP 9:
dependencies: lib1
modifications:
U : test.9.kt -> test.kt
modified ir: test.kt
STEP 10:
dependencies: lib1
modifications:
U : test.10.kt -> test.kt
modified ir: test.kt
@@ -0,0 +1,9 @@
private fun testClassA(): Int {
val a = ClassA()
a.someVar = 0
return a.someVar!!
}
fun test(): Int {
return testClassA()
}
@@ -0,0 +1,17 @@
private fun testClassA(): Int {
val a = ClassA()
a.someVar = 0
return a.someVar!!
}
private fun testClassB(): Int {
val b = ClassB()
b.someVar = b.x
return b.someVar!!
}
fun test(): Int {
val b = testClassB()
val a = testClassA()
return b + a
}
@@ -0,0 +1,17 @@
private fun testClassA(): Int {
val a = ClassA()
a.someVar = 0
return a.someVar!! + a.someFunction() + a.someValue
}
private fun testClassB(): Int {
val b = ClassB()
b.someVar = b.x
return b.someVar!! + b.someFunction()
}
fun test(): Int {
val b = testClassB()
val a = testClassA()
return b + a
}
@@ -0,0 +1,17 @@
private fun testClassA(): Int {
val a = ClassA()
a.someVar = 0
return a.someVar!!
}
private fun testClassB(): Int {
val b = ClassB()
b.someVar = b.x
return b.someVar!! + b.someFunction()
}
fun test(): Int {
val b = testClassB()
val a = testClassA()
return b + a
}
@@ -0,0 +1,17 @@
private fun testClassA(): Int {
val a = ClassA()
a.someVar = 0
return a.someVar!! + a.someFunction()
}
private fun testClassB(): Int {
val b = ClassB()
b.someVar = b.x
return b.someVar!! + b.someFunction()
}
fun test(): Int {
val b = testClassB()
val a = testClassA()
return b + a
}