[FIR] Fix cfg crash with multiple postponed arguments

This commit is contained in:
simon.ogorodnik
2020-05-13 16:43:43 +03:00
parent 5b63dad1c3
commit 86683e94fc
5 changed files with 162 additions and 1 deletions
@@ -0,0 +1,20 @@
// !DUMP_CFG
interface FirBase
interface FirFunctionCall : FirBase
fun foo(statements: List<FirBase>, arguments: List<FirBase>, explicitReceiver: FirBase): List<FirFunctionCall> {
val firstCalls = with(statements.last() as FirFunctionCall) setCall@{
buildList {
add(this@setCall)
with(arguments.last() as FirFunctionCall) plusCall@{
add(this@plusCall)
add(explicitReceiver as FirFunctionCall)
}
}
}
return firstCalls
}