[Parcel] Expand types from TypeParceler annotation to support aliases
Class properties are being expanded before checking for custom parcelers, which makes custom parcelers of type alias unable to be found. To maintain K1 behavior, the custom parceler type must also be expanded, so even the aliased type is supported when used in its raw form as a class property. ^KT-64707 Fixed
This commit is contained in:
+1
-1
@@ -80,7 +80,7 @@ object FirParcelizePropertyChecker : FirPropertyChecker() {
|
||||
private fun getCustomParcelerTypes(annotations: List<FirAnnotation>, session: FirSession): Set<ConeKotlinType> =
|
||||
annotations.mapNotNullTo(mutableSetOf()) { annotation ->
|
||||
if (annotation.fqName(session) in ParcelizeNames.TYPE_PARCELER_FQ_NAMES && annotation.typeArguments.size == 2) {
|
||||
annotation.typeArguments[0].toConeTypeProjection().type
|
||||
annotation.typeArguments[0].toConeTypeProjection().type?.fullyExpandedType(session)
|
||||
} else {
|
||||
null
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user