Wrap continuation with ContinuationImpl on callable references

in startCoroutineUninterceptedOrReturn. Otherwise, the coroutine will
not be interceptable later.

Add a test, which checks, that intercepted continuation is released.

 #KT-55869
This commit is contained in:
Ilmir Usmanov
2023-01-17 05:48:12 +01:00
committed by Space Team
parent 9a2cb2609f
commit d18672bfb1
23 changed files with 413 additions and 39 deletions
@@ -10259,6 +10259,12 @@ public class K2NativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTes
runTest("compiler/testData/codegen/box/coroutines/intrinsicSemantics/intercepted.kt");
}
@Test
@TestMetadata("releaseIntercepted.kt")
public void testReleaseIntercepted() throws Exception {
runTest("compiler/testData/codegen/box/coroutines/intrinsicSemantics/releaseIntercepted.kt");
}
@Test
@TestMetadata("resultExceptionOrNullInLambda.kt")
public void testResultExceptionOrNullInLambda() throws Exception {
@@ -10152,6 +10152,12 @@ public class NativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTest
runTest("compiler/testData/codegen/box/coroutines/intrinsicSemantics/intercepted.kt");
}
@Test
@TestMetadata("releaseIntercepted.kt")
public void testReleaseIntercepted() throws Exception {
runTest("compiler/testData/codegen/box/coroutines/intrinsicSemantics/releaseIntercepted.kt");
}
@Test
@TestMetadata("resultExceptionOrNullInLambda.kt")
public void testResultExceptionOrNullInLambda() throws Exception {