[FE] Determine intersection type emptiness by looking at supertypes properly: substitute their type arguments

This commit is contained in:
Victor Petukhov
2022-04-26 20:13:56 +03:00
committed by teamcity
parent a0260292ec
commit 20a8e5d742
17 changed files with 315 additions and 17 deletions
@@ -15217,6 +15217,12 @@ public class DiagnosisCompilerTestFE10TestdataTestGenerated extends AbstractDiag
runTest("compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/compatibilityResolveWhenVariableHasComplexIntersectionType.kt");
}
@Test
@TestMetadata("contravariance.kt")
public void testContravariance() throws Exception {
runTest("compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/contravariance.kt");
}
@Test
@TestMetadata("kt45461.kt")
public void testKt45461() throws Exception {
@@ -15510,6 +15516,18 @@ public class DiagnosisCompilerTestFE10TestdataTestGenerated extends AbstractDiag
public void testSelectFromCovariantAndContravariantTypes() throws Exception {
runTest("compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/selectFromCovariantAndContravariantTypes.kt");
}
@Test
@TestMetadata("substitutingSuperTypes.kt")
public void testSubstitutingSuperTypes() throws Exception {
runTest("compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/substitutingSuperTypes.kt");
}
@Test
@TestMetadata("substitutingSuperTypes2.kt")
public void testSubstitutingSuperTypes2() throws Exception {
runTest("compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/substitutingSuperTypes2.kt");
}
}
@Nested