FIR checker: warn useless as and is
This commit is contained in:
committed by
TeamCityServer
parent
19d939c36e
commit
e2dc21da90
@@ -1,13 +1,13 @@
|
||||
// See also KT-10992: we should have no errors for all unsafe hashCode() calls
|
||||
|
||||
fun foo(arg: Any?) {
|
||||
val x = arg as? Any ?: return
|
||||
val x = arg <!USELESS_CAST!>as? Any<!> ?: return
|
||||
arg.hashCode()
|
||||
x.hashCode()
|
||||
}
|
||||
|
||||
fun bar(arg: Any?) {
|
||||
arg as? Any ?: return
|
||||
arg <!USELESS_CAST!>as? Any<!> ?: return
|
||||
arg.hashCode()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user