Fix transforming of coroutine's create when it is suspend lambda with receiver

Unlike ordinary lambdas suspend lambdas has create method which invokes
the constructor of the lambda object (continuation).
The inliner could not cope with this.
The previous change fixed the case of suspend lambda without receiver.
This change adds support of suspend lambdas with receiver.

 #KT-21605: Fixed
This commit is contained in:
Ilmir Usmanov
2018-03-23 19:57:20 +03:00
parent e96b5f3117
commit 58bac6882d
6 changed files with 59 additions and 2 deletions
@@ -5930,6 +5930,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
doTest(fileName);
}
@TestMetadata("kt21605.kt")
public void testKt21605() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/kt21605.kt");
doTest(fileName);
}
@TestMetadata("lastExpressionIsLoop.kt")
public void testLastExpressionIsLoop() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/lastExpressionIsLoop.kt");