Fix type deserialization for suspend function types which was written by pre-release compiler.
Notes: if arity == 0, it means that type was `suspend () -> String` => arguments.size == 1, and it means that SuspendFunction0 has only one type argument and it is return type.
This commit is contained in:
+1
-1
@@ -147,7 +147,7 @@ class TypeDeserializer(
|
||||
// This case for types written by eap compiler 1.1
|
||||
1 -> {
|
||||
val arity = arguments.size - 1
|
||||
if (arity > 0) {
|
||||
if (arity >= 0) {
|
||||
KotlinTypeFactory.simpleType(annotations, functionTypeConstructor.builtIns.getSuspendFunction(arity).typeConstructor, arguments, nullable)
|
||||
}
|
||||
else {
|
||||
|
||||
Reference in New Issue
Block a user