Basic support of partially specified type arguments though a new underscore operator for type arguments

^KT-13394
This commit is contained in:
Victor Petukhov
2021-10-21 14:23:25 +03:00
parent e057831f7f
commit b69fb6779f
35 changed files with 1212 additions and 9 deletions
@@ -28999,6 +28999,39 @@ public class IrJsCodegenBoxES6TestGenerated extends AbstractIrJsCodegenBoxES6Tes
}
}
@TestMetadata("compiler/testData/codegen/box/underscoredTypeArguments")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class UnderscoredTypeArguments extends AbstractIrJsCodegenBoxES6Test {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR_ES6, testDataFilePath);
}
public void testAllFilesPresentInUnderscoredTypeArguments() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/underscoredTypeArguments"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR_ES6, true);
}
@TestMetadata("backTicked.kt")
public void testBackTicked() throws Exception {
runTest("compiler/testData/codegen/box/underscoredTypeArguments/backTicked.kt");
}
@TestMetadata("lambdaInputType.kt")
public void testLambdaInputType() throws Exception {
runTest("compiler/testData/codegen/box/underscoredTypeArguments/lambdaInputType.kt");
}
@TestMetadata("react.kt")
public void testReact() throws Exception {
runTest("compiler/testData/codegen/box/underscoredTypeArguments/react.kt");
}
@TestMetadata("simple.kt")
public void testSimple() throws Exception {
runTest("compiler/testData/codegen/box/underscoredTypeArguments/simple.kt");
}
}
@TestMetadata("compiler/testData/codegen/box/unit")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
@@ -28405,6 +28405,39 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
}
}
@TestMetadata("compiler/testData/codegen/box/underscoredTypeArguments")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class UnderscoredTypeArguments extends AbstractIrJsCodegenBoxTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath);
}
public void testAllFilesPresentInUnderscoredTypeArguments() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/underscoredTypeArguments"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true);
}
@TestMetadata("backTicked.kt")
public void testBackTicked() throws Exception {
runTest("compiler/testData/codegen/box/underscoredTypeArguments/backTicked.kt");
}
@TestMetadata("lambdaInputType.kt")
public void testLambdaInputType() throws Exception {
runTest("compiler/testData/codegen/box/underscoredTypeArguments/lambdaInputType.kt");
}
@TestMetadata("react.kt")
public void testReact() throws Exception {
runTest("compiler/testData/codegen/box/underscoredTypeArguments/react.kt");
}
@TestMetadata("simple.kt")
public void testSimple() throws Exception {
runTest("compiler/testData/codegen/box/underscoredTypeArguments/simple.kt");
}
}
@TestMetadata("compiler/testData/codegen/box/unit")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
@@ -24731,6 +24731,39 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest
}
}
@TestMetadata("compiler/testData/codegen/box/underscoredTypeArguments")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class UnderscoredTypeArguments extends AbstractIrCodegenBoxWasmTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest0(this::doTest, TargetBackend.WASM, testDataFilePath);
}
public void testAllFilesPresentInUnderscoredTypeArguments() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/underscoredTypeArguments"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.WASM, true);
}
@TestMetadata("backTicked.kt")
public void testBackTicked() throws Exception {
runTest("compiler/testData/codegen/box/underscoredTypeArguments/backTicked.kt");
}
@TestMetadata("lambdaInputType.kt")
public void testLambdaInputType() throws Exception {
runTest("compiler/testData/codegen/box/underscoredTypeArguments/lambdaInputType.kt");
}
@TestMetadata("react.kt")
public void testReact() throws Exception {
runTest("compiler/testData/codegen/box/underscoredTypeArguments/react.kt");
}
@TestMetadata("simple.kt")
public void testSimple() throws Exception {
runTest("compiler/testData/codegen/box/underscoredTypeArguments/simple.kt");
}
}
@TestMetadata("compiler/testData/codegen/box/unit")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
@@ -31537,6 +31537,40 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
}
}
@Nested
@TestMetadata("compiler/testData/codegen/box/underscoredTypeArguments")
@TestDataPath("$PROJECT_ROOT")
public class UnderscoredTypeArguments {
@Test
public void testAllFilesPresentInUnderscoredTypeArguments() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/underscoredTypeArguments"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS, true);
}
@Test
@TestMetadata("backTicked.kt")
public void testBackTicked() throws Exception {
runTest("compiler/testData/codegen/box/underscoredTypeArguments/backTicked.kt");
}
@Test
@TestMetadata("lambdaInputType.kt")
public void testLambdaInputType() throws Exception {
runTest("compiler/testData/codegen/box/underscoredTypeArguments/lambdaInputType.kt");
}
@Test
@TestMetadata("react.kt")
public void testReact() throws Exception {
runTest("compiler/testData/codegen/box/underscoredTypeArguments/react.kt");
}
@Test
@TestMetadata("simple.kt")
public void testSimple() throws Exception {
runTest("compiler/testData/codegen/box/underscoredTypeArguments/simple.kt");
}
}
@Nested
@TestMetadata("compiler/testData/codegen/box/unit")
@TestDataPath("$PROJECT_ROOT")