[FIR] Add enter contract node as exit for exceptional path to avoid compiler crashing

This fixes crashing test
 `FirDiagnosticsTestSpecGenerated.NotLinked.Contracts.Declarations.ContractBuilder.Common.Neg.test17`
This commit is contained in:
Dmitriy Novozhilov
2020-11-12 11:47:26 +03:00
committed by teamcityserver
parent 87380d1913
commit 15cc979378
@@ -1137,11 +1137,13 @@ class ControlFlowGraphBuilder {
return createContractDescriptionEnterNode().also {
lastNodes.push(it)
exitTargetsForTry.push(it)
}
}
fun exitContractDescription() {
lastNodes.pop()
exitTargetsForTry.pop()
popGraph()
}