FIR Parcelize: allow anonymous local objects if they're enum entries

This commit is contained in:
pyos
2022-09-15 11:47:03 +02:00
committed by Dmitriy Novozhilov
parent 1f1fef1067
commit 72e671c8f1
2 changed files with 23 additions and 21 deletions
@@ -8,7 +8,7 @@ import android.os.Parcel
import android.os.Parcelable
@Parcelize
enum class Color : Parcelable { BLACK, WHITE }
enum class Color(val rgba8: Long) : Parcelable { BLACK(0x000000FFL), WHITE(0xFFFFFFFFL) }
@Parcelize
object Obj : Parcelable
@@ -34,5 +34,6 @@ fun box() = parcelTest { parcel ->
println(obj2)
assert(black2 == black)
assert(black2.rgba8 == 0x000000FFL)
assert(obj2 != null)
}