Support kotlinx.collections.immutable in kotlin-parcelize plugin
#KT-57685 Fixed Co-authored-by: Ilya Gulya <ilyagulya@gmail.com>
This commit is contained in:
+1
-1
@@ -44,7 +44,7 @@ interface ParcelSerializer {
|
||||
val frameMap: FrameMap
|
||||
) {
|
||||
fun findParcelerClass(type: KotlinType): KotlinType? {
|
||||
return typeParcelers.firstOrNull { it.first == type }?.second
|
||||
return typeParcelers.firstOrNull { it.mappedType == type }?.parcelerType
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+4
-1
@@ -10,7 +10,10 @@ import org.jetbrains.kotlin.resolve.descriptorUtil.fqNameSafe
|
||||
import org.jetbrains.kotlin.types.KotlinType
|
||||
import org.jetbrains.kotlin.types.TypeUtils
|
||||
|
||||
typealias TypeParcelerMapping = Pair<KotlinType, KotlinType>
|
||||
data class TypeParcelerMapping(
|
||||
val mappedType: KotlinType,
|
||||
val parcelerType: KotlinType,
|
||||
)
|
||||
|
||||
fun KotlinType.isParcelable() = matchesFqNameWithSupertypes(ParcelizeNames.PARCELABLE_FQN.asString())
|
||||
|
||||
|
||||
Reference in New Issue
Block a user