What would you do in this case `val dowNotNull: Da...
# announcements
r
What would you do in this case
val dowNotNull: DayOfWeek = parcel.readEnum<DayOfWeek>()
if readInt() returns 0? I think you need two implementations anyway
p
throw an exception
r
So depending on the chosen T you throw or not right? You definitely need two implementations. But you could provide two overloads, so it reads natural to the consumer of your function
p
You can't add overloads because the nullity type doesn't exist on bytecode level
r
ah you're right
g
But you can use JvmName to avoid name conflict
r
In this case this does not help because you have the ambiguity in Kotlin itself