[FIR] Unbound aliased variables in DFA more carefully

This commit is contained in:
Dmitriy Novozhilov
2020-01-21 17:42:55 +03:00
parent 2a23e14e2b
commit 384a094193
7 changed files with 15 additions and 9 deletions
@@ -15,6 +15,6 @@ fun foo(arg: Int?) {
var z = arg
z = z?.let { 42 }
if (z != null) {
arg.<!INAPPLICABLE_CANDIDATE!>hashCode<!>()
arg.hashCode()
}
}
@@ -23,7 +23,7 @@ fun bar(s: String?) {
val hashCode = ss?.hashCode()
ss = null
if (hashCode != null) {
ss.<!INAPPLICABLE_CANDIDATE!>hashCode<!>()
ss.<!UNRESOLVED_REFERENCE!>hashCode<!>()
}
}
@@ -2,7 +2,7 @@
fun foo(arg: Int?): Int {
var i = arg
if (i != null && i++ == 5) {
return i<!INAPPLICABLE_CANDIDATE!>--<!> + i
return i-- + i
}
return 0
}