[JS IR BE] Support companion objects in external interfaces

These objects are referenced but value is not actually used.
Replace access to these references with null literals.
This commit is contained in:
Svyatoslav Kuzmich
2020-03-05 20:13:38 +03:00
committed by Zalim Bashorov
parent f4b94ccbc8
commit 3ec13d5bd6
4 changed files with 38 additions and 7 deletions
@@ -6479,9 +6479,7 @@ public class IrBoxJsTestGenerated extends AbstractIrBoxJsTest {
}
public void testAllFilesPresentInPropertyAccess() throws Exception {
KotlinTestUtils
.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("js/js.translator/testData/box/propertyAccess"),
Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.JS_IR, true);
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("js/js.translator/testData/box/propertyAccess"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.JS_IR, true);
}
@TestMetadata("classUsesPackageProperties.kt")
@@ -6816,6 +6814,11 @@ public class IrBoxJsTestGenerated extends AbstractIrBoxJsTest {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("js/js.translator/testData/box/regression"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.JS_IR, true);
}
@TestMetadata("companionObjectInExternalInterface.kt")
public void testCompanionObjectInExternalInterface() throws Exception {
runTest("js/js.translator/testData/box/regression/companionObjectInExternalInterface.kt");
}
@TestMetadata("enumEntryInitOrder.kt")
public void testEnumEntryInitOrder() throws Exception {
runTest("js/js.translator/testData/box/regression/enumEntryInitOrder.kt");
@@ -6504,9 +6504,7 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest {
}
public void testAllFilesPresentInPropertyAccess() throws Exception {
KotlinTestUtils
.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("js/js.translator/testData/box/propertyAccess"),
Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.JS, true);
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("js/js.translator/testData/box/propertyAccess"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.JS, true);
}
@TestMetadata("classUsesPackageProperties.kt")
@@ -6871,6 +6869,11 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("js/js.translator/testData/box/regression"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.JS, true);
}
@TestMetadata("companionObjectInExternalInterface.kt")
public void testCompanionObjectInExternalInterface() throws Exception {
runTest("js/js.translator/testData/box/regression/companionObjectInExternalInterface.kt");
}
@TestMetadata("enumEntryInitOrder.kt")
public void testEnumEntryInitOrder() throws Exception {
runTest("js/js.translator/testData/box/regression/enumEntryInitOrder.kt");