[ANDROID] Fix Parcelize reslove extension plugin
- make it provide its synthetic members names
This commit is contained in:
+10
@@ -75,6 +75,9 @@ open class ParcelableResolveExtension : SyntheticResolveExtension {
|
||||
return ValueParameterDescriptorImpl(
|
||||
this, null, index, Annotations.EMPTY, Name.identifier(name), type, false, false, false, null, this.source)
|
||||
}
|
||||
|
||||
private val parcelizeMethodNames: List<Name> =
|
||||
listOf(Name.identifier(DESCRIBE_CONTENTS.methodName), Name.identifier(WRITE_TO_PARCEL.methodName))
|
||||
}
|
||||
|
||||
@Deprecated(
|
||||
@@ -86,6 +89,13 @@ open class ParcelableResolveExtension : SyntheticResolveExtension {
|
||||
|
||||
override fun getSyntheticCompanionObjectNameIfNeeded(thisDescriptor: ClassDescriptor) = null
|
||||
|
||||
override fun getSyntheticFunctionNames(thisDescriptor: ClassDescriptor): List<Name> {
|
||||
return if (thisDescriptor.isParcelize)
|
||||
parcelizeMethodNames
|
||||
else
|
||||
emptyList()
|
||||
}
|
||||
|
||||
override fun generateSyntheticMethods(
|
||||
thisDescriptor: ClassDescriptor,
|
||||
name: Name,
|
||||
|
||||
Reference in New Issue
Block a user