[FIR] finally CFG exit node jump edges should match enter node edges

Jump edge targets are maintained globally within the CFG builder and are
added indiscriminately to `finally` exit nodes. This means that a
`finally` exit node could have a jump edge added which doesn't match how
the `finally` block was entered. Make sure edges are only added to the
exit node if they also exist on the enter node.

#KT-60723 Fixed
This commit is contained in:
Brian Norman
2023-07-18 14:26:44 -05:00
committed by Space Team
parent 5ab4229ee5
commit 1acdb3c143
9 changed files with 1077 additions and 3 deletions
@@ -30861,6 +30861,12 @@ public class DiagnosticCompilerTestFE10TestdataTestGenerated extends AbstractDia
runTest("compiler/testData/diagnostics/tests/smartCasts/castchecks/castInTryWithCatch.kt");
}
@Test
@TestMetadata("castInTryWithJump.kt")
public void testCastInTryWithJump() throws Exception {
runTest("compiler/testData/diagnostics/tests/smartCasts/castchecks/castInTryWithJump.kt");
}
@Test
@TestMetadata("castInTryWithoutCatch.kt")
public void testCastInTryWithoutCatch() throws Exception {
@@ -30861,6 +30861,12 @@ public class LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated
runTest("compiler/testData/diagnostics/tests/smartCasts/castchecks/castInTryWithCatch.kt");
}
@Test
@TestMetadata("castInTryWithJump.kt")
public void testCastInTryWithJump() throws Exception {
runTest("compiler/testData/diagnostics/tests/smartCasts/castchecks/castInTryWithJump.kt");
}
@Test
@TestMetadata("castInTryWithoutCatch.kt")
public void testCastInTryWithoutCatch() throws Exception {