FIR checker: warn useless as and is
This commit is contained in:
committed by
TeamCityServer
parent
19d939c36e
commit
e2dc21da90
Vendored
+1
-1
@@ -43,7 +43,7 @@ fun case_2(value: Any) {
|
||||
|
||||
// TESTCASE NUMBER: 3
|
||||
fun case_3(value: String?) {
|
||||
if (!value.isNullOrEmpty() is Boolean) {
|
||||
if (<!USELESS_IS_CHECK!>!value.isNullOrEmpty() is Boolean<!>) {
|
||||
value<!UNSAFE_CALL!>.<!>length
|
||||
}
|
||||
}
|
||||
|
||||
Vendored
+1
-1
@@ -158,7 +158,7 @@ class case_10_class {
|
||||
* ISSUES: KT-26747
|
||||
*/
|
||||
fun case_11(value_1: Any?, value_2: Any?, value_3: Any?) {
|
||||
funWithReturnsAndInvertCondition(value_1 !is String || value_2 !is Number || value_3 !is Any?)
|
||||
funWithReturnsAndInvertCondition(value_1 !is String || value_2 !is Number || <!USELESS_IS_CHECK!>value_3 !is Any?<!>)
|
||||
println(value_1<!UNNECESSARY_NOT_NULL_ASSERTION!>!!<!>.length)
|
||||
println(value_2<!UNNECESSARY_SAFE_CALL!>?.<!>toByte())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user