Forbid old coroutineContext deserialization. Fix suspend function deserialization
This commit is contained in:
+3
-3
@@ -167,14 +167,14 @@ class TypeDeserializer(
|
||||
val functionType = KotlinTypeFactory.simpleType(annotations, functionTypeConstructor, arguments, nullable)
|
||||
if (!functionType.isFunctionType) return null
|
||||
|
||||
transformRuntimeFunctionTypeToSuspendFunction(functionType, isReleaseCoroutines)?.let { return it }
|
||||
|
||||
// kotlin.suspend is still built with LV=1.2, thus it references old Continuation
|
||||
// And otherwise, once stdlib is compiled with 1.3 one may want to stay at LV=1.2
|
||||
if (c.containingDeclaration.safeAs<CallableDescriptor>()?.fqNameOrNull() == KOTLIN_SUSPEND_BUILT_IN_FUNCTION_FQ_NAME) {
|
||||
transformRuntimeFunctionTypeToSuspendFunction(functionType, !isReleaseCoroutines)?.let { return it }
|
||||
transformRuntimeFunctionTypeToSuspendFunction(functionType, false)?.let { return it }
|
||||
}
|
||||
|
||||
transformRuntimeFunctionTypeToSuspendFunction(functionType, isReleaseCoroutines)?.let { return it }
|
||||
|
||||
return null
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user