[FIR] Don't create smartcast node if smartcasted type is equal to original type

This commit is contained in:
Dmitriy Novozhilov
2021-02-19 17:47:44 +03:00
parent 1c0d862e40
commit 469252f6b4
30 changed files with 272 additions and 271 deletions
@@ -61,8 +61,8 @@ inline fun <reified T, reified K> case_6() {
var x: T? = 10 as T
if (x is K) {
x = null
<!DEBUG_INFO_EXPRESSION_TYPE("T? & T?")!>x<!><!UNSAFE_CALL!>.<!>equals(10)
<!DEBUG_INFO_EXPRESSION_TYPE("T? & T?")!>x<!>
<!DEBUG_INFO_EXPRESSION_TYPE("T?")!>x<!><!UNSAFE_CALL!>.<!>equals(10)
<!DEBUG_INFO_EXPRESSION_TYPE("T?")!>x<!>
println(1)
}
}