[Test] Add test for KT-35314
This commit is contained in:
committed by
Space Team
parent
5d6328a706
commit
38533977f0
+6
@@ -37680,6 +37680,12 @@ public class DiagnosticCompilerTestFE10TestdataTestGenerated extends AbstractDia
|
|||||||
runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow/flowInlining/breakContinuesInInlinedLambda.kt");
|
runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow/flowInlining/breakContinuesInInlinedLambda.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("complexTryWithTryInFinally.kt")
|
||||||
|
public void testComplexTryWithTryInFinally() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow/flowInlining/complexTryWithTryInFinally.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("expressionBody.kt")
|
@TestMetadata("expressionBody.kt")
|
||||||
public void testExpressionBody() throws Exception {
|
public void testExpressionBody() throws Exception {
|
||||||
|
|||||||
+6
@@ -37680,6 +37680,12 @@ public class LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated
|
|||||||
runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow/flowInlining/breakContinuesInInlinedLambda.kt");
|
runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow/flowInlining/breakContinuesInInlinedLambda.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("complexTryWithTryInFinally.kt")
|
||||||
|
public void testComplexTryWithTryInFinally() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow/flowInlining/complexTryWithTryInFinally.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("expressionBody.kt")
|
@TestMetadata("expressionBody.kt")
|
||||||
public void testExpressionBody() throws Exception {
|
public void testExpressionBody() throws Exception {
|
||||||
|
|||||||
+6
@@ -37680,6 +37680,12 @@ public class FirLightTreeOldFrontendDiagnosticsTestGenerated extends AbstractFir
|
|||||||
runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow/flowInlining/breakContinuesInInlinedLambda.kt");
|
runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow/flowInlining/breakContinuesInInlinedLambda.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("complexTryWithTryInFinally.kt")
|
||||||
|
public void testComplexTryWithTryInFinally() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow/flowInlining/complexTryWithTryInFinally.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("expressionBody.kt")
|
@TestMetadata("expressionBody.kt")
|
||||||
public void testExpressionBody() throws Exception {
|
public void testExpressionBody() throws Exception {
|
||||||
|
|||||||
+6
@@ -37776,6 +37776,12 @@ public class FirPsiOldFrontendDiagnosticsTestGenerated extends AbstractFirPsiDia
|
|||||||
runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow/flowInlining/breakContinuesInInlinedLambda.kt");
|
runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow/flowInlining/breakContinuesInInlinedLambda.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("complexTryWithTryInFinally.kt")
|
||||||
|
public void testComplexTryWithTryInFinally() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow/flowInlining/complexTryWithTryInFinally.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("expressionBody.kt")
|
@TestMetadata("expressionBody.kt")
|
||||||
public void testExpressionBody() throws Exception {
|
public void testExpressionBody() throws Exception {
|
||||||
|
|||||||
+1
@@ -0,0 +1 @@
|
|||||||
|
java.lang.StackOverflowError
|
||||||
+30
@@ -0,0 +1,30 @@
|
|||||||
|
// FIR_IDENTICAL
|
||||||
|
// ISSUE: KT-35314
|
||||||
|
|
||||||
|
import kotlin.contracts.ExperimentalContracts
|
||||||
|
import kotlin.contracts.InvocationKind
|
||||||
|
import kotlin.contracts.contract
|
||||||
|
|
||||||
|
class Foo {
|
||||||
|
fun bar() {
|
||||||
|
try {
|
||||||
|
myLet {
|
||||||
|
if (false) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} finally {
|
||||||
|
try {
|
||||||
|
} finally {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@OptIn(ExperimentalContracts::class)
|
||||||
|
inline fun myLet(block: () -> Unit) {
|
||||||
|
contract {
|
||||||
|
callsInPlace(block, InvocationKind.EXACTLY_ONCE)
|
||||||
|
}
|
||||||
|
return block()
|
||||||
|
}
|
||||||
Generated
+6
@@ -38608,6 +38608,12 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest {
|
|||||||
runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow/flowInlining/breakContinuesInInlinedLambda.kt");
|
runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow/flowInlining/breakContinuesInInlinedLambda.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("complexTryWithTryInFinally.kt")
|
||||||
|
public void testComplexTryWithTryInFinally() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow/flowInlining/complexTryWithTryInFinally.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("expressionBody.kt")
|
@TestMetadata("expressionBody.kt")
|
||||||
public void testExpressionBody() throws Exception {
|
public void testExpressionBody() throws Exception {
|
||||||
|
|||||||
Reference in New Issue
Block a user