[FIR] Use isSubtypeOfClass with platform types mapping instead of isSubtypeOf during checking CAST_NEVER_SUCCEEDS

Refactor and generalize code

^KT-62783 Fixed
This commit is contained in:
Ivan Kochurkin
2023-10-23 22:06:40 +02:00
committed by Space Team
parent 0935e2b270
commit 3b9095a5ab
9 changed files with 123 additions and 29 deletions
@@ -5790,6 +5790,12 @@ public class DiagnosticCompilerTestFE10TestdataTestGenerated extends AbstractDia
public void testNoGenericsUnrelated() throws Exception {
runTest("compiler/testData/diagnostics/tests/cast/neverSucceeds/NoGenericsUnrelated.kt");
}
@Test
@TestMetadata("NullableExprToItsNonNullableGenericBaseClass.kt")
public void testNullableExprToItsNonNullableGenericBaseClass() throws Exception {
runTest("compiler/testData/diagnostics/tests/cast/neverSucceeds/NullableExprToItsNonNullableGenericBaseClass.kt");
}
}
}
@@ -5790,6 +5790,12 @@ public class LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated
public void testNoGenericsUnrelated() throws Exception {
runTest("compiler/testData/diagnostics/tests/cast/neverSucceeds/NoGenericsUnrelated.kt");
}
@Test
@TestMetadata("NullableExprToItsNonNullableGenericBaseClass.kt")
public void testNullableExprToItsNonNullableGenericBaseClass() throws Exception {
runTest("compiler/testData/diagnostics/tests/cast/neverSucceeds/NullableExprToItsNonNullableGenericBaseClass.kt");
}
}
}