[FIR] Properly propagate deadness from try main block throw finally block

^KT-56476 Fixed
This commit is contained in:
Dmitriy Novozhilov
2023-02-17 16:08:03 +02:00
committed by Space Team
parent cecf22e035
commit 2a022ca9e0
8 changed files with 511 additions and 14 deletions
@@ -77,6 +77,15 @@ sealed class CFGNode<out E : FirElement>(val owner: ControlFlowGraph, val level:
}
from._followingNodes.clear()
}
@CfgInternals
fun removeAllIncomingEdges(to: CFGNode<*>) {
for (from in to._previousNodes) {
from._followingNodes.remove(to)
}
to._previousNodes.clear()
to._incomingEdges?.clear()
}
}
private val _previousNodes: MutableList<CFGNode<*>> = SmartList()