Implement callSuspend and callSuspendBy functions as KCallable's

extension methods.
Also make isSuspend a member of KCallable.
 #KT-21972: Fixed
This commit is contained in:
Ilmir Usmanov
2018-08-18 00:05:05 +03:00
committed by Ilya Gorbunov
parent 66315cee45
commit e93683621a
16 changed files with 355 additions and 81 deletions
@@ -7390,6 +7390,34 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
}
}
@TestMetadata("compiler/testData/codegen/box/coroutines/reflect")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class Reflect extends AbstractBlackBoxCodegenTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath);
}
public void testAllFilesPresentInReflect() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/coroutines/reflect"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true);
}
@TestMetadata("callSuspend.kt")
public void testCallSuspend() throws Exception {
runTest("compiler/testData/codegen/box/coroutines/reflect/callSuspend.kt");
}
@TestMetadata("callSuspendBy.kt")
public void testCallSuspendBy() throws Exception {
runTest("compiler/testData/codegen/box/coroutines/reflect/callSuspendBy.kt");
}
@TestMetadata("isSuspend12.kt")
public void testIsSuspend12() throws Exception {
runTest("compiler/testData/codegen/box/coroutines/reflect/isSuspend12.kt");
}
}
@TestMetadata("compiler/testData/codegen/box/coroutines/stackUnwinding")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)