[JS IR] IC: test private declarations with same names
This commit is contained in:
@@ -4138,6 +4138,12 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest {
|
||||
runTest("js/js.translator/testData/box/incremental/catchScope.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("clashingPrivateDeclarations.kt")
|
||||
public void testClashingPrivateDeclarations() throws Exception {
|
||||
runTest("js/js.translator/testData/box/incremental/clashingPrivateDeclarations.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("classReferencingClass.kt")
|
||||
public void testClassReferencingClass() throws Exception {
|
||||
|
||||
+6
@@ -4510,6 +4510,12 @@ public class IrBoxJsTestGenerated extends AbstractIrBoxJsTest {
|
||||
runTest("js/js.translator/testData/box/incremental/catchScope.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("clashingPrivateDeclarations.kt")
|
||||
public void testClashingPrivateDeclarations() throws Exception {
|
||||
runTest("js/js.translator/testData/box/incremental/clashingPrivateDeclarations.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("classReferencingClass.kt")
|
||||
public void testClassReferencingClass() throws Exception {
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
// MODULE: lib
|
||||
// FILE: lib.kt
|
||||
|
||||
private fun ok() = "Lib"
|
||||
|
||||
fun testLib() = ok()
|
||||
|
||||
// MODULE: main(lib)
|
||||
// FILE: mainAux.kt
|
||||
// RECOMPILE
|
||||
|
||||
private fun ok() = "Aux"
|
||||
|
||||
fun testAux() = ok()
|
||||
|
||||
// FILE: main.kt
|
||||
|
||||
private fun ok() = "OK"
|
||||
|
||||
fun box(): String {
|
||||
if (testLib() != "Lib") return "fail1"
|
||||
if (testAux() != "Aux") return "fail2"
|
||||
return ok()
|
||||
}
|
||||
Reference in New Issue
Block a user