Put the type inference on calls with self types under the compiler flag
This commit is contained in:
+51
-13
@@ -14185,22 +14185,60 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti
|
||||
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");
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/diagnostics/tests/inference/recursiveTypes/selfTypes/disabledInferenceOnSelfTypes")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
public class DisabledInferenceOnSelfTypes {
|
||||
@Test
|
||||
public void testAllFilesPresentInDisabledInferenceOnSelfTypes() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/inference/recursiveTypes/selfTypes/disabledInferenceOnSelfTypes"), 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/disabledInferenceOnSelfTypes/basicInferenceForImplicitSelfType.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("recursiveTypeWithTwoTypeParams.kt")
|
||||
public void testRecursiveTypeWithTwoTypeParams() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/inference/recursiveTypes/selfTypes/disabledInferenceOnSelfTypes/recursiveTypeWithTwoTypeParams.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("writerAppenderExampleRecursive.kt")
|
||||
public void testWriterAppenderExampleRecursive() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/inference/recursiveTypes/selfTypes/disabledInferenceOnSelfTypes/writerAppenderExampleRecursive.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("recursiveTypeWithTwoTypeParams.kt")
|
||||
public void testRecursiveTypeWithTwoTypeParams() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/inference/recursiveTypes/selfTypes/recursiveTypeWithTwoTypeParams.kt");
|
||||
}
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/diagnostics/tests/inference/recursiveTypes/selfTypes/enabledInferenceOnSelfTypes")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
public class EnabledInferenceOnSelfTypes {
|
||||
@Test
|
||||
public void testAllFilesPresentInEnabledInferenceOnSelfTypes() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/inference/recursiveTypes/selfTypes/enabledInferenceOnSelfTypes"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("writerAppenderExampleRecursive.kt")
|
||||
public void testWriterAppenderExampleRecursive() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/inference/recursiveTypes/selfTypes/writerAppenderExampleRecursive.kt");
|
||||
@Test
|
||||
@TestMetadata("basicInferenceForImplicitSelfType.kt")
|
||||
public void testBasicInferenceForImplicitSelfType() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/inference/recursiveTypes/selfTypes/enabledInferenceOnSelfTypes/basicInferenceForImplicitSelfType.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("recursiveTypeWithTwoTypeParams.kt")
|
||||
public void testRecursiveTypeWithTwoTypeParams() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/inference/recursiveTypes/selfTypes/enabledInferenceOnSelfTypes/recursiveTypeWithTwoTypeParams.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("writerAppenderExampleRecursive.kt")
|
||||
public void testWriterAppenderExampleRecursive() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/inference/recursiveTypes/selfTypes/enabledInferenceOnSelfTypes/writerAppenderExampleRecursive.kt");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+51
-13
@@ -14185,22 +14185,60 @@ public class FirOldFrontendDiagnosticsWithLightTreeTestGenerated extends Abstrac
|
||||
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");
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/diagnostics/tests/inference/recursiveTypes/selfTypes/disabledInferenceOnSelfTypes")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
public class DisabledInferenceOnSelfTypes {
|
||||
@Test
|
||||
public void testAllFilesPresentInDisabledInferenceOnSelfTypes() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/inference/recursiveTypes/selfTypes/disabledInferenceOnSelfTypes"), 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/disabledInferenceOnSelfTypes/basicInferenceForImplicitSelfType.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("recursiveTypeWithTwoTypeParams.kt")
|
||||
public void testRecursiveTypeWithTwoTypeParams() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/inference/recursiveTypes/selfTypes/disabledInferenceOnSelfTypes/recursiveTypeWithTwoTypeParams.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("writerAppenderExampleRecursive.kt")
|
||||
public void testWriterAppenderExampleRecursive() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/inference/recursiveTypes/selfTypes/disabledInferenceOnSelfTypes/writerAppenderExampleRecursive.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("recursiveTypeWithTwoTypeParams.kt")
|
||||
public void testRecursiveTypeWithTwoTypeParams() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/inference/recursiveTypes/selfTypes/recursiveTypeWithTwoTypeParams.kt");
|
||||
}
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/diagnostics/tests/inference/recursiveTypes/selfTypes/enabledInferenceOnSelfTypes")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
public class EnabledInferenceOnSelfTypes {
|
||||
@Test
|
||||
public void testAllFilesPresentInEnabledInferenceOnSelfTypes() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/inference/recursiveTypes/selfTypes/enabledInferenceOnSelfTypes"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("writerAppenderExampleRecursive.kt")
|
||||
public void testWriterAppenderExampleRecursive() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/inference/recursiveTypes/selfTypes/writerAppenderExampleRecursive.kt");
|
||||
@Test
|
||||
@TestMetadata("basicInferenceForImplicitSelfType.kt")
|
||||
public void testBasicInferenceForImplicitSelfType() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/inference/recursiveTypes/selfTypes/enabledInferenceOnSelfTypes/basicInferenceForImplicitSelfType.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("recursiveTypeWithTwoTypeParams.kt")
|
||||
public void testRecursiveTypeWithTwoTypeParams() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/inference/recursiveTypes/selfTypes/enabledInferenceOnSelfTypes/recursiveTypeWithTwoTypeParams.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("writerAppenderExampleRecursive.kt")
|
||||
public void testWriterAppenderExampleRecursive() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/inference/recursiveTypes/selfTypes/enabledInferenceOnSelfTypes/writerAppenderExampleRecursive.kt");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -26,7 +26,7 @@ class InferenceComponents(val session: FirSession) : FirSessionComponent {
|
||||
approximator,
|
||||
session.languageVersionSettings,
|
||||
)
|
||||
val resultTypeResolver = ResultTypeResolver(approximator, trivialConstraintTypeInferenceOracle)
|
||||
val resultTypeResolver = ResultTypeResolver(approximator, trivialConstraintTypeInferenceOracle, session.languageVersionSettings)
|
||||
val variableFixationFinder = VariableFixationFinder(trivialConstraintTypeInferenceOracle, session.languageVersionSettings)
|
||||
val postponedArgumentInputTypesResolver =
|
||||
PostponedArgumentInputTypesResolver(resultTypeResolver, variableFixationFinder, ConeConstraintSystemUtilContext)
|
||||
|
||||
Reference in New Issue
Block a user