Use AnonymousFunctionDescriptor for suspend callable references

Also use it for local suspend functions, which allows us to remove hack
with dropSuspend.

Regenerate tests.
This commit is contained in:
Ilmir Usmanov
2018-07-03 16:06:41 +03:00
parent eea95441c5
commit 28ad498956
31 changed files with 259 additions and 292 deletions
@@ -3367,6 +3367,10 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo
KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath);
}
private void runTestWithPackageReplacement(String testDataFilePath, String packageName) throws Exception {
KotlinTestUtils.runTest(filePath -> doTestWithCoroutinesPackageReplacement(filePath, packageName), TargetBackend.ANY, testDataFilePath);
}
public void testAllFilesPresentInCallableReference() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend/callableReference"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
}
@@ -3378,14 +3382,12 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo
@TestMetadata("simple.kt")
public void testSimple_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/callableReference/simple.kt");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/callableReference/simple.kt", "kotlin.coroutines.experimental");
}
@TestMetadata("simple.kt")
public void testSimple_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/callableReference/simple.kt");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/callableReference/simple.kt", "kotlin.coroutines");
}
@TestMetadata("suspendOfOrdinary.kt")