FIR: fix some errors in local variable assignment analyzer

* wrong method was called from FirDataFlowAnalyzer.exitFunctionCall;
 * map from function to affected properties should be keyed by symbol,
   not FirFunction, as the latter may change;
 * arguments of `return` and assignment statements should be visited,
   as they may contain lambdas.
This commit is contained in:
pyos
2022-06-09 15:09:02 +02:00
committed by Dmitriy Novozhilov
parent 9968fa252a
commit 526e46cffc
7 changed files with 43 additions and 121 deletions
@@ -1,18 +0,0 @@
// Issue: KT-30826
interface I1
interface I2 {
fun foo() {}
}
class A : I1, I2
fun foo(x: I1?) {
var y = x
y as I2
val bar = {
y.foo() // NPE in NI, smartcast impossible in OI
}
y = null
bar()
}
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
// Issue: KT-30826
interface I1