[FIR] Unify code of type unification, fix intersection types processing in FirCastDiagnosticsHelpers.kt
This commit is contained in:
committed by
TeamCityServer
parent
98cce8e05b
commit
5fda933c33
@@ -1,6 +1,7 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
// KT-10444 Do not ignore smart (unchecked) casts to the same classifier
|
||||
|
||||
class Base<in T>
|
||||
class Qwe<T : Any>(val a: T?) {
|
||||
fun test1(obj: Any) {
|
||||
obj <!UNCHECKED_CAST!>as Qwe<T><!>
|
||||
@@ -12,6 +13,10 @@ class Qwe<T : Any>(val a: T?) {
|
||||
check(obj.a)
|
||||
}
|
||||
|
||||
fun test2(b: Base<*>) {
|
||||
b <!UNCHECKED_CAST!>as Base<Any><!>
|
||||
}
|
||||
|
||||
fun check(a: T?) {
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user