https://kotlinlang.org logo
Title
m

Marc Knaup

05/25/2021, 2:34 PM
If this is a deliberate change in Kotlin (expect enums no longer exhaustive) then please don’t use
expect enum
in
kotlinx-datetime
😕 https://github.com/Kotlin/kotlinx-datetime/issues/96
i

ilya.gorbunov

05/26/2021, 3:56 AM
We know about the exhaustiveness problem of expect enums and sealed classes/interfaces. We might eventually solve it with https://youtrack.jetbrains.com/issue/KT-38750
m

Marc Knaup

05/26/2021, 3:40 PM
That would improve the situation. There are more issues with typaliasing instead of having its own enum though, as mentioned in the GitHub issue. I’d prefer to have it fixed & improved from the library’s side. Just fixing the new exhaustiveness problem only solves one of the existing issues.
Just now I ran into the issue that I’ve accidentally serialized
Duration
to database and for GraphQL with
toString()
instead of
toIsoString()
😅 Good that I’ve got unit tests 😑
i

ilya.gorbunov

05/31/2021, 4:00 PM
Did you mean to post in the other thread (this is about enums)? 🙂
m

Marc Knaup

06/01/2021, 8:32 PM
wtf happened 😂 thanks