Support recursive local suspend functions

Previously they were trying to call constructor (incorrectly) for
recursive calls. This is redundant, since this.invoke creates one
automatically.

In addition, support callable references to recursive local suspend
functions.

 #KT-24780 Fixed
This commit is contained in:
Ilmir Usmanov
2018-11-27 17:36:44 +03:00
parent 8359887696
commit 4a828f839f
7 changed files with 163 additions and 7 deletions
@@ -7311,6 +7311,11 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/localFunctions/named/nestedLocals.kt", "kotlin.coroutines");
}
@TestMetadata("rec.kt")
public void testRec() throws Exception {
runTest("compiler/testData/codegen/box/coroutines/localFunctions/named/rec.kt");
}
@TestMetadata("simpleSuspensionPoint.kt")
public void testSimpleSuspensionPoint_1_2() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/localFunctions/named/simpleSuspensionPoint.kt", "kotlin.coroutines.experimental");