[FIR][CFG] Partial support of postponed Nothing calls

In try blocks, last call won't be completed when building node for it
This is workaround to partially reconstruct nothing stub node for such
calls. Should work for non-local returns in try only.
#KT-48160 Fixed
This commit is contained in:
Andrey Zinovyev
2021-08-10 13:59:54 +03:00
committed by TeamCityServer
parent 445e5122c1
commit 3ec9599bc4
7 changed files with 98 additions and 2 deletions
@@ -5908,6 +5908,12 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti
runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/definiteReturn/kt4034.kt");
}
@Test
@TestMetadata("lambdaInTryFalsePositive.kt")
public void testLambdaInTryFalsePositive() throws Exception {
runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/definiteReturn/lambdaInTryFalsePositive.kt");
}
@Test
@TestMetadata("ReturnFromFunctionInObject.kt")
public void testReturnFromFunctionInObject() throws Exception {
@@ -5908,6 +5908,12 @@ public class FirOldFrontendDiagnosticsWithLightTreeTestGenerated extends Abstrac
runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/definiteReturn/kt4034.kt");
}
@Test
@TestMetadata("lambdaInTryFalsePositive.kt")
public void testLambdaInTryFalsePositive() throws Exception {
runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/definiteReturn/lambdaInTryFalsePositive.kt");
}
@Test
@TestMetadata("ReturnFromFunctionInObject.kt")
public void testReturnFromFunctionInObject() throws Exception {