[FIR] Improve approximation of captured types
- Handle flexible types in recursion check - Handle intersected supertypes separately - Make check when not to approximate captured types in type argument position more fine-grained. Only apply it to case when the captured type is replaced by a star projection. All other cases are handled by recursive calls to approximateCapturedType #KT-65377 Fixed
This commit is contained in:
committed by
Space Team
parent
831ef0f909
commit
b90598823e
+6
@@ -18059,6 +18059,12 @@ public class DiagnosticCompilerTestFE10TestdataTestGenerated extends AbstractDia
|
||||
runTest("compiler/testData/diagnostics/tests/inference/capturedTypes/dontCheckNewCapturedTypeSpecificChecksForOldOnes.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("expectedTypeHasCapturedStarArgument.kt")
|
||||
public void testExpectedTypeHasCapturedStarArgument() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/inference/capturedTypes/expectedTypeHasCapturedStarArgument.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("expectedTypeMismatchWithInVariance.kt")
|
||||
public void testExpectedTypeMismatchWithInVariance() throws Exception {
|
||||
|
||||
+6
@@ -18059,6 +18059,12 @@ public class LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated
|
||||
runTest("compiler/testData/diagnostics/tests/inference/capturedTypes/dontCheckNewCapturedTypeSpecificChecksForOldOnes.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("expectedTypeHasCapturedStarArgument.kt")
|
||||
public void testExpectedTypeHasCapturedStarArgument() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/inference/capturedTypes/expectedTypeHasCapturedStarArgument.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("expectedTypeMismatchWithInVariance.kt")
|
||||
public void testExpectedTypeMismatchWithInVariance() throws Exception {
|
||||
|
||||
Reference in New Issue
Block a user