[FE 1.0] Report USELESS_IS_CHECK if is expression is always false
^KT-47684 Fixed
This commit is contained in:
committed by
teamcityserver
parent
785e2f862c
commit
7b5a5f5682
+2
-2
@@ -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<!>)) {
|
||||
<!DEBUG_INFO_SMARTCAST!>x<!>.length
|
||||
x.<!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>inc<!>()
|
||||
y.<!UNRESOLVED_REFERENCE!>length<!>
|
||||
|
||||
Reference in New Issue
Block a user