Closed
Description
This is more of an FYI than a bug report for kotlin-result, although you might want to highlight this in the README.
I see with 2.0 you've switched to an inline value class. This will (I think) cause problems using kotlin-result with Retrofit, Ktor, SQLDelight (other libraries may also be affected, these are just the ones I'm aware of).
See for example, these issues which relate to the Kotlin stdlib.Result
with those libraries, where the underlying cause seems to be that stdlib.Result
is an inline value class.
- java.lang.ClassCastException: class kotlin.Result cannot be cast to class java.lang.String (kotlin.Result is in unnamed module of loader 'app'; java.lang.String is in module java.base of loader 'bootstrap') Kotlin/kotlinx.coroutines#3403
- https://youtrack.jetbrains.com/issue/KT-53559/JVM-ClassCastException-class-kotlin.Result-cannot-be-cast-to-class-java.lang.String-with-Retrofit
- https://youtrack.jetbrains.com/issue/KT-27105
- https://youtrack.jetbrains.com/issue/KT-27586
- Using inline class for id results in ClassCastException at runtime sqldelight/sqldelight#1285
Metadata
Metadata
Assignees
Labels
No labels