Support async iterator case with coroutines

Not all the `hasNext` operators return types is exactly Z,
suspend operators return boxed versions.

So the fix is just coercing result value after invoked function to Z
This commit is contained in:
Denis Zharkov
2016-12-19 11:00:55 +03:00
parent 1076397530
commit a1ac77d382
6 changed files with 206 additions and 7 deletions
@@ -4493,6 +4493,12 @@ public class LightAnalysisModeCodegenTestGenerated extends AbstractLightAnalysis
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/coroutines"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true);
}
@TestMetadata("asyncIterator.kt")
public void testAsyncIterator() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/asyncIterator.kt");
doTest(fileName);
}
@TestMetadata("await.kt")
public void testAwait() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/await.kt");