Parcelize: Support objects and enums (#KT-22576)

This commit is contained in:
Yan Zhulanow
2018-03-27 21:20:16 +03:00
parent 4e3674b330
commit d5f0495031
8 changed files with 90 additions and 33 deletions
@@ -24,7 +24,7 @@ class Outer {
fun foo() {
@Parcelize
<error descr="[PLUGIN_ERROR] 'Parcelable' should be a class">object</error> : Parcelable {}
<error descr="[PLUGIN_ERROR] 'Parcelable' can't be a local class">object</error> : Parcelable {}
@Parcelize
class <error descr="[PLUGIN_ERROR] 'Parcelable' can't be a local class"><error descr="[PLUGIN_ERROR] No 'Parcelable' supertype">Local</error></error> {}
@@ -7,17 +7,17 @@ import android.os.Parcelable
interface <error descr="[PLUGIN_ERROR] 'Parcelable' should be a class">Intf</error> : Parcelable
@Parcelize
object <error descr="[PLUGIN_ERROR] 'Parcelable' should be a class">Obj</error>
object <error descr="[PLUGIN_ERROR] No 'Parcelable' supertype">Obj</error>
class A {
@Parcelize
companion <error descr="[PLUGIN_ERROR] 'Parcelable' should be a class">object</error> {
companion <error descr="[PLUGIN_ERROR] No 'Parcelable' supertype">object</error> {
fun foo() {}
}
}
@Parcelize
enum class <error descr="[PLUGIN_ERROR] 'Parcelable' should be a class">Enum</error> {
enum class <error descr="[PLUGIN_ERROR] No 'Parcelable' supertype">Enum</error> {
WHITE, BLACK
}