FIR DFA: don't erase statements when entering non-call-in-place lambda

Instead, rely on the variable assignment analyzer to properly restrict
smart casts. This makes error messages more consistent, but otherwise
should have no effect.
This commit is contained in:
pyos
2022-12-12 19:40:53 +01:00
committed by Dmitriy Novozhilov
parent 5a79017879
commit 1aae586238
2 changed files with 12 additions and 14 deletions
@@ -30,7 +30,7 @@ fun baz(s: String?) {
<!SMARTCAST_IMPOSSIBLE!>x<!>.hashCode()
}
run {
x<!UNSAFE_CALL!>.<!>hashCode()
<!SMARTCAST_IMPOSSIBLE!>x<!>.hashCode()
x = null
}
}
@@ -40,7 +40,7 @@ fun gaz(s: String?) {
var x = s
if (x != null) {
run {
x<!UNSAFE_CALL!>.<!>hashCode()
<!SMARTCAST_IMPOSSIBLE!>x<!>.hashCode()
x = null
}
run {