Parcelable: Add CREATOR field (and other generated declarations) in light classes (KT-19300, KT-19853)

This commit is contained in:
Yan Zhulanow
2017-12-16 01:45:54 +09:00
parent 90dff281ba
commit 145ddf3b1f
29 changed files with 129 additions and 66 deletions
+4
View File
@@ -3,6 +3,7 @@
@file:Suppress("UsePropertyAccessSyntax", "UNUSED_VARIABLE", "unused", "UNUSED_PARAMETER", "DEPRECATION")
import android.os.Parcel
import android.os.Parcelable
import kotlinx.android.parcel.Parcelize
class <error descr="This class implements `Parcelable` but does not provide a `CREATOR` field">MyParcelable1</error> : Parcelable {
override fun describeContents() = 0
@@ -98,3 +99,6 @@ internal abstract class MyParcelable4 : Parcelable {
override fun describeContents() = 0
override fun writeToParcel(arg0: Parcel, arg1: Int) {}
}
@Parcelize
class ParcelizeUser(val firstName: String, val lastName: String) : Parcelable