If the same type parameter needs more than one upp...
# android
a
If the same type parameter needs more than one upper bound, we need a separate where-clause. However i'm getting error at line no. 5. Please help!
Overload resolution ambiguity. All these functions match. @RecentlyNonNull public open fun putExtra(name: String!, value: Parcelable!): Intent! defined in android.content.Intent @RecentlyNonNull public open fun putExtra(name: String!, value: Serializable!): Intent! defined in android.content.Inten
a
thats because both can match. cast the type as one or the other so it knows which method to use
a
Or maybe you want data to be one of Either instead of both?
a
Data may be either of two.
a
by doing it this way its a union
it must be both, not Either
a
Okay i got it thanks.