[FIR] Fix break/continue in try-finally in loop, ^KT-51759

This commit is contained in:
Ivan Kochurkin
2022-03-31 13:49:40 +03:00
committed by teamcity
parent e9b9322672
commit c7122c1492
9 changed files with 65 additions and 8 deletions
@@ -640,10 +640,10 @@ class ControlFlowGraphBuilder {
else -> throw IllegalArgumentException("Unknown jump type: ${jump.render()}")
}
val labelForFinallyBLock = if (jump is FirReturnExpression) {
ReturnPath(jump.target.labeledElement.symbol)
} else {
NormalPath
val labelForFinallyBLock = when (jump) {
is FirReturnExpression -> ReturnPath(jump.target.labeledElement.symbol)
is FirLoopJump -> LoopPath(jump)
else -> NormalPath
}
addNodeWithJump(