[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
@@ -30,11 +30,11 @@ fun useEn(x: En) = x
|
||||
fun useEn2(x: En2) = x
|
||||
|
||||
fun bar(x: Any) {
|
||||
if (x is En && x is En2) {
|
||||
if (x is En && <!USELESS_IS_CHECK!>x is En2<!>) {
|
||||
when (<!DEBUG_INFO_SMARTCAST!>x<!>) {
|
||||
En.A -> useEn(<!DEBUG_INFO_SMARTCAST!>x<!>)
|
||||
En2.D -> useEn2(<!DEBUG_INFO_SMARTCAST!>x<!>)
|
||||
else -> {}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user