[JS IR] Control an inheritance of non-external entity from external

Add a special annotation @JsExternalInheritorsOnly for marking
 external interfaces and classes. The marked interface or class
 can’t be a parent for non external interfaces, classes or objects.

^KT-57423 Fixed
This commit is contained in:
Alexander Korepanov
2023-03-21 11:45:04 +01:00
committed by Space Team
parent 6e7b078873
commit 4813b659ab
26 changed files with 677 additions and 1 deletions
@@ -2457,6 +2457,12 @@ public class FirJsBoxTestGenerated extends AbstractFirJsBoxTest {
runTest("js/js.translator/testData/box/esModules/jsModule/interfaces.kt");
}
@Test
@TestMetadata("jsExternalInheritorsOnly.kt")
public void testJsExternalInheritorsOnly() throws Exception {
runTest("js/js.translator/testData/box/esModules/jsModule/jsExternalInheritorsOnly.kt");
}
@Test
@TestMetadata("topLevelVarargFun.kt")
public void testTopLevelVarargFun() throws Exception {
@@ -37,6 +37,12 @@ public class FirPsiJsOldFrontendDiagnosticsTestGenerated extends AbstractFirPsiJ
runTest("compiler/testData/diagnostics/testsWithJsStdLib/implementingFunction.kt");
}
@Test
@TestMetadata("jsExternalInheritorsOnly.kt")
public void testJsExternalInheritorsOnly() throws Exception {
runTest("compiler/testData/diagnostics/testsWithJsStdLib/jsExternalInheritorsOnly.kt");
}
@Test
@TestMetadata("localClassMetadata.kt")
public void testLocalClassMetadata() throws Exception {
@@ -2563,6 +2563,12 @@ public class IrBoxJsES6TestGenerated extends AbstractIrBoxJsES6Test {
runTest("js/js.translator/testData/box/esModules/jsModule/interfaces.kt");
}
@Test
@TestMetadata("jsExternalInheritorsOnly.kt")
public void testJsExternalInheritorsOnly() throws Exception {
runTest("js/js.translator/testData/box/esModules/jsModule/jsExternalInheritorsOnly.kt");
}
@Test
@TestMetadata("topLevelVarargFun.kt")
public void testTopLevelVarargFun() throws Exception {
@@ -2457,6 +2457,12 @@ public class IrBoxJsTestGenerated extends AbstractIrBoxJsTest {
runTest("js/js.translator/testData/box/esModules/jsModule/interfaces.kt");
}
@Test
@TestMetadata("jsExternalInheritorsOnly.kt")
public void testJsExternalInheritorsOnly() throws Exception {
runTest("js/js.translator/testData/box/esModules/jsModule/jsExternalInheritorsOnly.kt");
}
@Test
@TestMetadata("topLevelVarargFun.kt")
public void testTopLevelVarargFun() throws Exception {