[FIR] Add smartcasts from == if equals is from Any

^KT-49127 Fixed
This commit is contained in:
Dmitriy Novozhilov
2021-12-01 13:50:55 +03:00
committed by teamcityserver
parent ac718cd1c4
commit 1f0b62b25f
16 changed files with 472 additions and 29 deletions
@@ -203,7 +203,7 @@ fun case_11(x: TypealiasNullableString<!REDUNDANT_NULLABLE!>?<!>, y: TypealiasNu
} else {
if (y != z) {
if (nullableStringProperty == z) {
if (u != z || u != v) {
if (u != z || <!SENSELESS_COMPARISON!>u != v<!>) {
<!DEBUG_INFO_EXPRESSION_TYPE("TypealiasNullableString?")!>x<!>
<!DEBUG_INFO_EXPRESSION_TYPE("TypealiasNullableString?")!>x<!>.equals(null)
<!DEBUG_INFO_EXPRESSION_TYPE("TypealiasNullableString?")!>x<!>.propT
@@ -790,7 +790,7 @@ fun case_42() {
fun case_43(x: TypealiasNullableString) {
val z = null
if (x == z && <!DEBUG_INFO_EXPRESSION_TYPE("TypealiasNullableString")!>x<!> == z) {
if (x == z && <!SENSELESS_COMPARISON!><!DEBUG_INFO_EXPRESSION_TYPE("TypealiasNullableString & kotlin.Nothing?")!>x<!> == z<!>) {
<!DEBUG_INFO_EXPRESSION_TYPE("TypealiasNullableString")!>x<!>
<!DEBUG_INFO_EXPRESSION_TYPE("TypealiasNullableString")!>x<!>.hashCode()
}