[FIR] Don't create union call node for lambda from one when branch and call from condition of another

This commit is contained in:
Dmitriy Novozhilov
2021-08-06 12:55:26 +03:00
committed by teamcityserver
parent 684ef871ee
commit 1d491fdce6
9 changed files with 214 additions and 12 deletions
@@ -627,6 +627,7 @@ class ControlFlowGraphBuilder {
}
fun enterWhenBranchCondition(whenBranch: FirWhenBranch): WhenBranchConditionEnterNode {
levelCounter += whenBranchIndices.top().getValue(whenBranch)
return createWhenBranchConditionEnterNode(whenBranch).also { addNewSimpleNode(it) }.also { levelCounter++ }
}
@@ -639,7 +640,6 @@ class ControlFlowGraphBuilder {
lastNodes.push(it)
addEdge(conditionExitNode, it)
}
levelCounter += whenBranchIndices.top().getValue(whenBranch)
return conditionExitNode to branchEnterNode
}