diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/BoxJsTestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/BoxJsTestGenerated.java index 92a34a8c481..c00990342b9 100644 --- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/BoxJsTestGenerated.java +++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/BoxJsTestGenerated.java @@ -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 { diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrBoxJsTestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrBoxJsTestGenerated.java index 34a7feea9b7..f8f5a66326f 100644 --- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrBoxJsTestGenerated.java +++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrBoxJsTestGenerated.java @@ -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 { diff --git a/js/js.translator/testData/box/incremental/clashingPrivateDeclarations.kt b/js/js.translator/testData/box/incremental/clashingPrivateDeclarations.kt new file mode 100644 index 00000000000..8a05775df90 --- /dev/null +++ b/js/js.translator/testData/box/incremental/clashingPrivateDeclarations.kt @@ -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() +} \ No newline at end of file