Parcelize: Support @IgnoreOnParcel primary constructor parameters...
...with default values. See https://issuetracker.google.com/177850560
This commit is contained in:
committed by
Alexander Udalov
parent
00289d3514
commit
58c687e42d
+9
@@ -0,0 +1,9 @@
|
||||
// FIR_IDENTICAL
|
||||
package test
|
||||
|
||||
import android.os.Parcelable
|
||||
import kotlinx.parcelize.Parcelize
|
||||
import kotlinx.parcelize.IgnoredOnParcel
|
||||
|
||||
@Parcelize
|
||||
class A(@IgnoredOnParcel val x: String = "OK") : Parcelable
|
||||
Vendored
+16
@@ -0,0 +1,16 @@
|
||||
// FIR_IDENTICAL
|
||||
package test
|
||||
|
||||
import android.os.Parcelable
|
||||
import kotlinx.parcelize.Parcelize
|
||||
import kotlinx.parcelize.IgnoredOnParcel
|
||||
|
||||
class T(val x: Int)
|
||||
|
||||
@Parcelize
|
||||
class A(
|
||||
// T is not parcelable, but we don't need it to be since it is not being serialized.
|
||||
@IgnoredOnParcel val x: T = T(0)
|
||||
) : Parcelable {
|
||||
@IgnoredOnParcel val y: T = x
|
||||
}
|
||||
Reference in New Issue
Block a user