[Parcelize] Fully expand type aliases when checking for RawValue
^KT-61432 Fixed
This commit is contained in:
+1
-1
@@ -65,7 +65,7 @@ object FirParcelizePropertyChecker : FirPropertyChecker() {
|
|||||||
context: CheckerContext,
|
context: CheckerContext,
|
||||||
reporter: DiagnosticReporter
|
reporter: DiagnosticReporter
|
||||||
) {
|
) {
|
||||||
val type = property.returnTypeRef.coneType
|
val type = property.returnTypeRef.coneType.fullyExpandedType(context.session)
|
||||||
if (type is ConeErrorType || containingClassSymbol.hasCustomParceler(context.session) || property.hasIgnoredOnParcel()) {
|
if (type is ConeErrorType || containingClassSymbol.hasCustomParceler(context.session) || property.hasIgnoredOnParcel()) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|||||||
+7
-1
@@ -1,10 +1,14 @@
|
|||||||
// FIR_IDENTICAL
|
// FIR_IDENTICAL
|
||||||
|
|
||||||
package test
|
package test
|
||||||
|
|
||||||
import kotlinx.parcelize.Parcelize
|
import kotlinx.parcelize.Parcelize
|
||||||
import kotlinx.parcelize.RawValue
|
import kotlinx.parcelize.RawValue
|
||||||
import android.os.Parcelable
|
import android.os.Parcelable
|
||||||
|
|
||||||
|
typealias TypeAlias = Any
|
||||||
|
typealias RawValueTypeAlias = @RawValue Any
|
||||||
|
|
||||||
@Parcelize
|
@Parcelize
|
||||||
class User(
|
class User(
|
||||||
val a: String,
|
val a: String,
|
||||||
@@ -14,5 +18,7 @@ class User(
|
|||||||
val e: @RawValue Any?,
|
val e: @RawValue Any?,
|
||||||
val f: @RawValue Map<String, Any>,
|
val f: @RawValue Map<String, Any>,
|
||||||
val g: Map<String, @RawValue Any>,
|
val g: Map<String, @RawValue Any>,
|
||||||
val h: Map<@RawValue Any, List<@RawValue Any>>
|
val h: Map<@RawValue Any, List<@RawValue Any>>,
|
||||||
|
val i: @RawValue TypeAlias,
|
||||||
|
val j: RawValueTypeAlias,
|
||||||
) : Parcelable
|
) : Parcelable
|
||||||
|
|||||||
Reference in New Issue
Block a user