FIR DFA: x !is T? => x != null

^KT-22996 tag fixed-in-k2
This commit is contained in:
pyos
2022-11-14 17:18:01 +01:00
committed by teamcity
parent 02fedeb9ed
commit f485413cfd
18 changed files with 118 additions and 53 deletions
@@ -207,7 +207,7 @@ fun case_10(x: Any?) {
if (x is ClassLevel1? && x is ClassLevel2? && x is ClassLevel3?) {
if (x is ClassLevel4?) {
} else if (x is ClassLevel5? && x != null) {
} else if (x is ClassLevel5? && <!SENSELESS_COMPARISON!>x != null<!>) {
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any? & ClassLevel5")!>x<!>
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any? & ClassLevel5")!>x<!>.equals(null)
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any? & ClassLevel5")!>x<!>.propT
@@ -224,7 +224,7 @@ fun case_10(x: Any?) {
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any? & ClassLevel5")!>x<!>.test4()
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any? & ClassLevel5")!>x<!>.test5()
}
} else if (x is ClassLevel4? && x != null && x is ClassLevel5?) {
} else if (x is ClassLevel4? && <!SENSELESS_COMPARISON!>x != null<!> && x is ClassLevel5?) {
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any? & ClassLevel5")!>x<!>
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any? & ClassLevel5")!>x<!>.equals(null)
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any? & ClassLevel5")!>x<!>.propT