Generate version requirement on inline functions since API version 1.4
The old compiler will crash if it tries to inline a function that's passing a lambda parameter into the new parameter null check method `Intrinsics.checkNotNullParameter` because that usage is not considered as inlinable by the old compiler (it only knows about `Intrinsics.checkParameterIsNotNull`). Therefore we require that these functions can only be read by compilers of version 1.3.50 or greater. #KT-22275 Fixed
This commit is contained in:
+1
-1
@@ -353,7 +353,7 @@ class DescriptorSerializer private constructor(
|
||||
|
||||
contractSerializer.serializeContractOfFunctionIfAny(descriptor, builder, this)
|
||||
|
||||
extension.serializeFunction(descriptor, builder, local)
|
||||
extension.serializeFunction(descriptor, builder, versionRequirementTable, local)
|
||||
|
||||
return builder
|
||||
}
|
||||
|
||||
@@ -56,6 +56,7 @@ abstract class SerializerExtension {
|
||||
open fun serializeFunction(
|
||||
descriptor: FunctionDescriptor,
|
||||
proto: ProtoBuf.Function.Builder,
|
||||
versionRequirementTable: MutableVersionRequirementTable?,
|
||||
childSerializer: DescriptorSerializer
|
||||
) {
|
||||
}
|
||||
|
||||
+1
@@ -55,6 +55,7 @@ abstract class KotlinSerializerExtensionBase(private val protocol: SerializerExt
|
||||
override fun serializeFunction(
|
||||
descriptor: FunctionDescriptor,
|
||||
proto: ProtoBuf.Function.Builder,
|
||||
versionRequirementTable: MutableVersionRequirementTable?,
|
||||
childSerializer: DescriptorSerializer
|
||||
) {
|
||||
for (annotation in descriptor.nonSourceAnnotations) {
|
||||
|
||||
Reference in New Issue
Block a user