Support open suspend members and super-calls
The problem was that the resume call (from doResume) for open members was based on common INVOKEVIRTUAL to the original function that lead to the invocation of the override when it was expected to be the overridden (after super-call being suspended) The solution is to generate method bodies for open members into the special $suspendImpl synthetic function that may be called from the doResume implementation #KT-17587 Fixed
This commit is contained in:
@@ -5680,6 +5680,18 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("superCall.kt")
|
||||
public void testSuperCall() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/superCall.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("superCallInterface.kt")
|
||||
public void testSuperCallInterface() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/superCallInterface.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("withVariables.kt")
|
||||
public void testWithVariables() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/withVariables.kt");
|
||||
|
||||
Reference in New Issue
Block a user