[FIR] Don't save DFA implications for unstable local vars

^KT-57502 Fixed
This commit is contained in:
Dmitriy Novozhilov
2023-05-09 14:22:33 +03:00
committed by Space Team
parent 31424e38ac
commit 40b8b682f9
16 changed files with 289 additions and 12 deletions
@@ -0,0 +1,13 @@
// FIR_IDENTICAL
// WITH_STDLIB
// ISSUE: KT-57502
import kotlin.properties.Delegates
fun test(foo: Any) {
var test by Delegates.observable(true) { property, oldValue, newValue -> }
test = foo is String
if (test) {
foo.<!UNRESOLVED_REFERENCE!>length<!> // no smartcast
}
}
@@ -15,6 +15,6 @@ fun foo(arg: Int?) {
var z = arg
z = z?.let { 42 }
if (z != null) {
arg.hashCode()
arg<!UNSAFE_CALL!>.<!>hashCode()
}
}