[Test] KT-59012: tests for inferring types based on self upper bound

Add tests on JK inheritance cases, extension functions for Enum and some basic recursive type cases
This commit is contained in:
anzhela.sukhanova
2024-02-02 10:50:20 +02:00
committed by Space Team
parent e1df52bc02
commit 14b6f6d050
11 changed files with 300 additions and 0 deletions
@@ -19771,12 +19771,30 @@ public class DiagnosticCompilerTestFE10TestdataTestGenerated extends AbstractDia
runTest("compiler/testData/diagnostics/tests/inference/recursiveTypes/selfTypes/enabledInferenceOnSelfTypes/basicInferenceForImplicitSelfType.kt");
}
@Test
@TestMetadata("enumExtensionFunction.kt")
public void testEnumExtensionFunction() throws Exception {
runTest("compiler/testData/diagnostics/tests/inference/recursiveTypes/selfTypes/enabledInferenceOnSelfTypes/enumExtensionFunction.kt");
}
@Test
@TestMetadata("overridingJKCases.kt")
public void testOverridingJKCases() throws Exception {
runTest("compiler/testData/diagnostics/tests/inference/recursiveTypes/selfTypes/enabledInferenceOnSelfTypes/overridingJKCases.kt");
}
@Test
@TestMetadata("recursiveTypeWithTwoTypeParams.kt")
public void testRecursiveTypeWithTwoTypeParams() throws Exception {
runTest("compiler/testData/diagnostics/tests/inference/recursiveTypes/selfTypes/enabledInferenceOnSelfTypes/recursiveTypeWithTwoTypeParams.kt");
}
@Test
@TestMetadata("whereAndWithCases.kt")
public void testWhereAndWithCases() throws Exception {
runTest("compiler/testData/diagnostics/tests/inference/recursiveTypes/selfTypes/enabledInferenceOnSelfTypes/whereAndWithCases.kt");
}
@Test
@TestMetadata("writerAppenderExampleRecursive.kt")
public void testWriterAppenderExampleRecursive() throws Exception {
@@ -19771,12 +19771,30 @@ public class LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated
runTest("compiler/testData/diagnostics/tests/inference/recursiveTypes/selfTypes/enabledInferenceOnSelfTypes/basicInferenceForImplicitSelfType.kt");
}
@Test
@TestMetadata("enumExtensionFunction.kt")
public void testEnumExtensionFunction() throws Exception {
runTest("compiler/testData/diagnostics/tests/inference/recursiveTypes/selfTypes/enabledInferenceOnSelfTypes/enumExtensionFunction.kt");
}
@Test
@TestMetadata("overridingJKCases.kt")
public void testOverridingJKCases() throws Exception {
runTest("compiler/testData/diagnostics/tests/inference/recursiveTypes/selfTypes/enabledInferenceOnSelfTypes/overridingJKCases.kt");
}
@Test
@TestMetadata("recursiveTypeWithTwoTypeParams.kt")
public void testRecursiveTypeWithTwoTypeParams() throws Exception {
runTest("compiler/testData/diagnostics/tests/inference/recursiveTypes/selfTypes/enabledInferenceOnSelfTypes/recursiveTypeWithTwoTypeParams.kt");
}
@Test
@TestMetadata("whereAndWithCases.kt")
public void testWhereAndWithCases() throws Exception {
runTest("compiler/testData/diagnostics/tests/inference/recursiveTypes/selfTypes/enabledInferenceOnSelfTypes/whereAndWithCases.kt");
}
@Test
@TestMetadata("writerAppenderExampleRecursive.kt")
public void testWriterAppenderExampleRecursive() throws Exception {