JVM_IR: make continuation detection more consistent
* unify various checks for whether a suspend function needs a
continuation;
* mark the continuation parameter with an origin (this also allows
correctly computing the offset of the local in codegen -- see the
new test);
* when wrapping `suspend fun main`, use a suspend reference instead of
a synthetic non-suspend lambda (required to correctly implement the
previous point, as previously the continuation parameter was passed
to main() itself correctly only because of very lenient checks in
AddContinuationLowering).
This commit is contained in:
+5
@@ -3813,6 +3813,11 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo
|
||||
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/multipleSuspensionPoints.kt", "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("nestedMethodWith2XParameter.kt")
|
||||
public void testNestedMethodWith2XParameter() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxInline/suspend/nestedMethodWith2XParameter.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("nonSuspendCrossinline.kt")
|
||||
public void testNonSuspendCrossinline_1_2() throws Exception {
|
||||
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/nonSuspendCrossinline.kt", "kotlin.coroutines.experimental");
|
||||
|
||||
Reference in New Issue
Block a user