FIR checker: warn useless as and is

This commit is contained in:
Jinseong Jeon
2021-04-28 22:32:51 -07:00
committed by TeamCityServer
parent 19d939c36e
commit e2dc21da90
141 changed files with 417 additions and 543 deletions
@@ -264,7 +264,7 @@ fun case_23(z: Any?) {
val y = z.run {
when (this) {
true -> this<!UNNECESSARY_NOT_NULL_ASSERTION!>!!<!>
0.0 -> this as Any
0.0 -> this <!USELESS_CAST!>as Any<!>
else -> this!!
}
}
@@ -277,7 +277,7 @@ fun case_24(z: Any?) {
val y = z.let {
when (it) {
true -> it<!UNNECESSARY_NOT_NULL_ASSERTION!>!!<!>
0.0 -> it as Any
0.0 -> it <!USELESS_CAST!>as Any<!>
else -> it!!
}
}