[JS IC] fix cross-module nested class references and interface inheritance
^ KT-50528 fixed
This commit is contained in:
@@ -4210,6 +4210,12 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest {
|
||||
runTest("js/js.translator/testData/box/incremental/inlineSuspendFun.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("interfaceInheritanceCrossModule.kt")
|
||||
public void testInterfaceInheritanceCrossModule() throws Exception {
|
||||
runTest("js/js.translator/testData/box/incremental/interfaceInheritanceCrossModule.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("jsModule.kt")
|
||||
public void testJsModule() throws Exception {
|
||||
@@ -4228,6 +4234,12 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest {
|
||||
runTest("js/js.translator/testData/box/incremental/multipleReimport.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("nestedClassesInDependency.kt")
|
||||
public void testNestedClassesInDependency() throws Exception {
|
||||
runTest("js/js.translator/testData/box/incremental/nestedClassesInDependency.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("packagesWithSameName.kt")
|
||||
public void testPackagesWithSameName() throws Exception {
|
||||
|
||||
+12
@@ -4582,6 +4582,12 @@ public class IrBoxJsTestGenerated extends AbstractIrBoxJsTest {
|
||||
runTest("js/js.translator/testData/box/incremental/inlineSuspendFun.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("interfaceInheritanceCrossModule.kt")
|
||||
public void testInterfaceInheritanceCrossModule() throws Exception {
|
||||
runTest("js/js.translator/testData/box/incremental/interfaceInheritanceCrossModule.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("jsModule.kt")
|
||||
public void testJsModule() throws Exception {
|
||||
@@ -4600,6 +4606,12 @@ public class IrBoxJsTestGenerated extends AbstractIrBoxJsTest {
|
||||
runTest("js/js.translator/testData/box/incremental/multipleReimport.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("nestedClassesInDependency.kt")
|
||||
public void testNestedClassesInDependency() throws Exception {
|
||||
runTest("js/js.translator/testData/box/incremental/nestedClassesInDependency.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("packagesWithSameName.kt")
|
||||
public void testPackagesWithSameName() throws Exception {
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
// NO_COMMON_FILES
|
||||
// MODULE: lib
|
||||
// FILE: lib.kt
|
||||
|
||||
package lib
|
||||
|
||||
interface A {
|
||||
fun foo() = 23
|
||||
}
|
||||
|
||||
// MODULE: main(lib)
|
||||
// FILE: main.kt
|
||||
// RECOMPILE
|
||||
|
||||
package main
|
||||
|
||||
import lib.A
|
||||
|
||||
class B : A {
|
||||
fun bar() = foo() + 1
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
val result = B().bar()
|
||||
if (result != 24) return "fail: $result"
|
||||
return "OK"
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
// NO_COMMON_FILES
|
||||
// MODULE: lib
|
||||
// FILE: lib.kt
|
||||
|
||||
class A {
|
||||
class B(val msg: String)
|
||||
|
||||
fun foo(b: B) = b.msg
|
||||
}
|
||||
|
||||
// MODULE: main(lib)
|
||||
// FILE: main.kt
|
||||
// RECOMPILE
|
||||
|
||||
fun box() = A().foo(A.B("OK"))
|
||||
Reference in New Issue
Block a user