Inference for some kind of self types

This commit is contained in:
Mikhail Zarechenskiy
2021-06-18 02:50:22 +03:00
committed by Victor Petukhov
parent db72fd1e93
commit 44cf4be1e5
15 changed files with 273 additions and 16 deletions
@@ -14175,6 +14175,34 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti
public void testTwoTypeConstructors() throws Exception {
runTest("compiler/testData/diagnostics/tests/inference/recursiveTypes/twoTypeConstructors.kt");
}
@Nested
@TestMetadata("compiler/testData/diagnostics/tests/inference/recursiveTypes/selfTypes")
@TestDataPath("$PROJECT_ROOT")
public class SelfTypes {
@Test
public void testAllFilesPresentInSelfTypes() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/inference/recursiveTypes/selfTypes"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
}
@Test
@TestMetadata("basicInferenceForImplicitSelfType.kt")
public void testBasicInferenceForImplicitSelfType() throws Exception {
runTest("compiler/testData/diagnostics/tests/inference/recursiveTypes/selfTypes/basicInferenceForImplicitSelfType.kt");
}
@Test
@TestMetadata("recursiveTypeWithTwoTypeParams.kt")
public void testRecursiveTypeWithTwoTypeParams() throws Exception {
runTest("compiler/testData/diagnostics/tests/inference/recursiveTypes/selfTypes/recursiveTypeWithTwoTypeParams.kt");
}
@Test
@TestMetadata("writerAppenderExampleRecursive.kt")
public void testWriterAppenderExampleRecursive() throws Exception {
runTest("compiler/testData/diagnostics/tests/inference/recursiveTypes/selfTypes/writerAppenderExampleRecursive.kt");
}
}
}
@Nested
@@ -14175,6 +14175,34 @@ public class FirOldFrontendDiagnosticsWithLightTreeTestGenerated extends Abstrac
public void testTwoTypeConstructors() throws Exception {
runTest("compiler/testData/diagnostics/tests/inference/recursiveTypes/twoTypeConstructors.kt");
}
@Nested
@TestMetadata("compiler/testData/diagnostics/tests/inference/recursiveTypes/selfTypes")
@TestDataPath("$PROJECT_ROOT")
public class SelfTypes {
@Test
public void testAllFilesPresentInSelfTypes() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/inference/recursiveTypes/selfTypes"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
}
@Test
@TestMetadata("basicInferenceForImplicitSelfType.kt")
public void testBasicInferenceForImplicitSelfType() throws Exception {
runTest("compiler/testData/diagnostics/tests/inference/recursiveTypes/selfTypes/basicInferenceForImplicitSelfType.kt");
}
@Test
@TestMetadata("recursiveTypeWithTwoTypeParams.kt")
public void testRecursiveTypeWithTwoTypeParams() throws Exception {
runTest("compiler/testData/diagnostics/tests/inference/recursiveTypes/selfTypes/recursiveTypeWithTwoTypeParams.kt");
}
@Test
@TestMetadata("writerAppenderExampleRecursive.kt")
public void testWriterAppenderExampleRecursive() throws Exception {
runTest("compiler/testData/diagnostics/tests/inference/recursiveTypes/selfTypes/writerAppenderExampleRecursive.kt");
}
}
}
@Nested