[Parcelize] Detect redundant TypeParceler when type aliases are used
Make sure redundancies between class and property TypeParceler annotations are detected when a type alias is used. This requires checking the expanded type arguments of the annotation, as just comparing the cone types is not sufficient because the type arguments are not expanded. ^KT-64979 Fixed
This commit is contained in:
+2
-4
@@ -1,6 +1,4 @@
|
||||
// WITH_STDLIB
|
||||
// fir doesn't support annotations with type arguments
|
||||
// IGNORE_BACKEND_K2: JVM_IR
|
||||
|
||||
@file:JvmName("TestKt")
|
||||
package test
|
||||
@@ -32,8 +30,8 @@ object Parceler3 : Parceler<String> {
|
||||
data class Test(
|
||||
val a: String,
|
||||
@<!REDUNDANT_TYPE_PARCELER!>TypeParceler<!><String, Parceler1> val b: String,
|
||||
@TypeParceler<String, Parceler3> val c: CharSequence,
|
||||
val d: @WriteWith<Parceler3> String
|
||||
@TypeParceler<String, Parceler3> val c: CharSequence,
|
||||
val d: @WriteWith<Parceler3> String,
|
||||
) : Parcelable
|
||||
|
||||
fun box() = parcelTest { parcel ->
|
||||
|
||||
Reference in New Issue
Block a user