[FIR] Support of type arguments in annotations ^KT-48444 Fixed

This commit is contained in:
Ivan Kochurkin
2022-04-06 20:54:26 +03:00
committed by teamcity
parent 05bed8f751
commit 8c7fad9a5e
26 changed files with 465 additions and 36 deletions
@@ -19,27 +19,27 @@ class StringClassParceler : Parceler<String> {
override fun String.write(parcel: Parcel, flags: Int) = TODO()
}
@<!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER, NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>TypeParceler<!><String, StringParceler>
class MissingParcelizeAnnotation(val a: @<!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>WriteWith<!><StringParceler> String)
@TypeParceler<String, StringParceler>
class MissingParcelizeAnnotation(val a: @WriteWith<StringParceler> String)
@Parcelize
@<!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER, NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>TypeParceler<!><String, StringClassParceler>
class ShouldBeClass(val a: @<!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>WriteWith<!><StringClassParceler> String) : Parcelable
@TypeParceler<String, StringClassParceler>
class ShouldBeClass(val a: @WriteWith<StringClassParceler> String) : Parcelable
@Parcelize
class Test(
val a: @<!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>WriteWith<!><StringParceler> Int,
val b: @<!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>WriteWith<!><StringParceler> String,
val c: @<!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>WriteWith<!><StringParceler> CharSequence,
val d: @<!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>WriteWith<!><CharSequenceParceler> String,
val e: @<!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>WriteWith<!><CharSequenceParceler> CharSequence
val a: @WriteWith<StringParceler> Int,
val b: @WriteWith<StringParceler> String,
val c: @WriteWith<StringParceler> CharSequence,
val d: @WriteWith<CharSequenceParceler> String,
val e: @WriteWith<CharSequenceParceler> CharSequence
) : Parcelable
@Parcelize
@<!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER, NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>TypeParceler<!><String, StringParceler>
class Test2(@<!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER, NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER, NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER, NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>TypeParceler<!><String, StringParceler> val a: String) : Parcelable
@TypeParceler<String, StringParceler>
class Test2(@TypeParceler<String, StringParceler> val a: String) : Parcelable
@Parcelize
@<!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER, NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>TypeParceler<!><String, StringParceler>
@<!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER, NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>TypeParceler<!><String, CharSequenceParceler>
@TypeParceler<String, StringParceler>
@TypeParceler<String, CharSequenceParceler>
class Test3(val a: String) : Parcelable
@@ -22,11 +22,11 @@ object <!DEPRECATED_PARCELER!>Parceler2<!> : Parceler<List<String>> {
}
<!DEPRECATED_ANNOTATION!>@Parcelize<!>
<!FORBIDDEN_DEPRECATED_ANNOTATION!>@<!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER, NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>TypeParceler<!><String, Parceler2><!>
<!FORBIDDEN_DEPRECATED_ANNOTATION!>@TypeParceler<String, Parceler2><!>
data class Test(
val a: String,
val b: <!FORBIDDEN_DEPRECATED_ANNOTATION!>@<!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>WriteWith<!><Parceler1><!> String,
val c: <!FORBIDDEN_DEPRECATED_ANNOTATION!>@<!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>WriteWith<!><Parceler2><!> List<<!FORBIDDEN_DEPRECATED_ANNOTATION!>@<!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>WriteWith<!><Parceler1><!> String>
val b: <!FORBIDDEN_DEPRECATED_ANNOTATION!>@WriteWith<Parceler1><!> String,
val c: <!FORBIDDEN_DEPRECATED_ANNOTATION!>@WriteWith<Parceler2><!> List<<!FORBIDDEN_DEPRECATED_ANNOTATION!>@WriteWith<Parceler1><!> String>
) : Parcelable {
<!DEPRECATED_ANNOTATION!>@IgnoredOnParcel<!>
val x by lazy { "foo" }