[FIR] Check is for impossibility

^KT-58203 Fixed
^KT-62646
This commit is contained in:
Nikolay Lunyak
2024-02-29 15:39:33 +02:00
committed by Space Team
parent 92d8da621e
commit 88ff93df7f
42 changed files with 110 additions and 83 deletions
@@ -45,8 +45,8 @@ fun intersectingInfo2(x: Any?, y: Any?) {
// of them is absent in each arg of "||"-operator, so they *shouldn't* lead to smartcast
if ((isString(x) && !notIsInt(x) && y is String) ||
(!notIsString(x) && isString(y) && y is Int) ||
(x is String && !notIsInt(y) && x is Int)) {
(!notIsString(x) && isString(y) && <!USELESS_IS_CHECK!>y is Int<!>) ||
(x is String && !notIsInt(y) && <!USELESS_IS_CHECK!>x is Int<!>)) {
x.length
x.<!UNRESOLVED_REFERENCE!>inc<!>()
y.<!UNRESOLVED_REFERENCE!>length<!>