[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
@@ -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<*>
}