[JS IR] Export nested objects

Companion objects are exported as ParentClass.Companion.
Companion object's members are not exposed to its parent class —
one must reference the companion object explicitly if they want to
access its members.

#KT-43783 Fixed
This commit is contained in:
Sergej Jaskiewicz
2021-08-26 16:30:23 +03:00
committed by TeamCityServer
parent 862f8cdad8
commit be999564b1
7 changed files with 83 additions and 3 deletions
@@ -1627,6 +1627,11 @@ public class IrBoxJsES6TestGenerated extends AbstractIrBoxJsES6Test {
runTest("js/js.translator/testData/box/export/exportNestedClass.kt");
}
@TestMetadata("exportNestedObject.kt")
public void testExportNestedObject() throws Exception {
runTest("js/js.translator/testData/box/export/exportNestedObject.kt");
}
@TestMetadata("nonIndetifierModuleName.kt")
public void testNonIndetifierModuleName() throws Exception {
runTest("js/js.translator/testData/box/export/nonIndetifierModuleName.kt");
@@ -1627,6 +1627,11 @@ public class IrBoxJsTestGenerated extends AbstractIrBoxJsTest {
runTest("js/js.translator/testData/box/export/exportNestedClass.kt");
}
@TestMetadata("exportNestedObject.kt")
public void testExportNestedObject() throws Exception {
runTest("js/js.translator/testData/box/export/exportNestedObject.kt");
}
@TestMetadata("nonIndetifierModuleName.kt")
public void testNonIndetifierModuleName() throws Exception {
runTest("js/js.translator/testData/box/export/nonIndetifierModuleName.kt");
@@ -1632,6 +1632,11 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest {
runTest("js/js.translator/testData/box/export/exportNestedClass.kt");
}
@TestMetadata("exportNestedObject.kt")
public void testExportNestedObject() throws Exception {
runTest("js/js.translator/testData/box/export/exportNestedObject.kt");
}
@TestMetadata("nonIndetifierModuleName.kt")
public void testNonIndetifierModuleName() throws Exception {
runTest("js/js.translator/testData/box/export/nonIndetifierModuleName.kt");