[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:
committed by
Space Team
parent
0935e2b270
commit
3b9095a5ab
Vendored
+1
-1
@@ -5,5 +5,5 @@ class Foo1<A> : Foo<Int>()
|
||||
class Foo2 : Foo<Int>()
|
||||
|
||||
fun process(foo: Foo<Long>) {
|
||||
foo <!CAST_NEVER_SUCCEEDS!>as<!> Foo1<*>
|
||||
foo as Foo1<*>
|
||||
}
|
||||
|
||||
+6
@@ -5784,6 +5784,12 @@ public class FirLightTreeOldFrontendDiagnosticsTestGenerated extends AbstractFir
|
||||
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");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+6
@@ -5790,6 +5790,12 @@ public class FirPsiOldFrontendDiagnosticsTestGenerated extends AbstractFirPsiDia
|
||||
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");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user