FIR checker: report SMARTCAST_IMPOSSIBLE for local variables
This commit is contained in:
committed by
TeamCityServer
parent
092750e215
commit
0ecc752813
@@ -3,7 +3,7 @@ fun foo(arg: Int?) {
|
||||
var x = arg
|
||||
if (x == null) return
|
||||
run {
|
||||
// Not safe: x = null later in the owner
|
||||
// Safe: since `run` is in-place
|
||||
<!SMARTCAST_IMPOSSIBLE!>x<!>.hashCode()
|
||||
}
|
||||
x = null
|
||||
|
||||
Reference in New Issue
Block a user