FIR checker: warn useless as and is
This commit is contained in:
committed by
TeamCityServer
parent
19d939c36e
commit
e2dc21da90
@@ -139,7 +139,7 @@ fun case_10() {
|
||||
*/
|
||||
fun case_11() {
|
||||
var x: Any? = null
|
||||
x as? Any ?: null!!
|
||||
x <!USELESS_CAST!>as? Any<!> ?: null!!
|
||||
do {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any?")!>x<!>
|
||||
x = x<!UNSAFE_CALL!>.<!>equals(10)
|
||||
@@ -187,7 +187,7 @@ fun case_14() {
|
||||
do {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any?")!>x<!>
|
||||
x = x<!UNSAFE_CALL!>.<!>equals(10)
|
||||
} while (x is Any)
|
||||
} while (<!USELESS_IS_CHECK!>x is Any<!>)
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -201,6 +201,6 @@ fun case_15() {
|
||||
do {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any?")!>x<!>
|
||||
x = x <!UNSAFE_CALL!>.<!>equals(10)
|
||||
} while (x is Any)
|
||||
} while (<!USELESS_IS_CHECK!>x is Any<!>)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user