Kapt: Fix an ArrayIndexOutOfBoundsException for suspend functions with generated return types

This commit is contained in:
Yan Zhulanow
2018-11-08 15:29:19 +09:00
parent 69633e6686
commit 4c5e982f3e
4 changed files with 37 additions and 1 deletions
@@ -0,0 +1,9 @@
// CORRECT_ERROR_TYPES
// WITH_RUNTIME
@file:Suppress("UNRESOLVED_REFERENCE")
class Foo {
suspend fun a(): ABC = TODO()
suspend fun b(): Result<ABC> = TODO()
}
@@ -0,0 +1,21 @@
import java.lang.System;
@kotlin.Metadata()
public final class Foo {
@org.jetbrains.annotations.Nullable()
public final java.lang.Object a(@org.jetbrains.annotations.NotNull()
kotlin.coroutines.Continuation<? super error.NonExistentClass> p0) {
return null;
}
@org.jetbrains.annotations.Nullable()
public final java.lang.Object b(@org.jetbrains.annotations.NotNull()
kotlin.coroutines.Continuation<? super kotlin.Result<? extends error.NonExistentClass>> p0) {
return null;
}
public Foo() {
super();
}
}