I’m using `kotlin.Result` and trying to come up wi...
# android
i
I’m using
kotlin.Result
and trying to come up with a solution to backport it to java since it doesn’t really have good support. I have a simple Java class to kinda mimick the behavior, but
kotlin.Result
get’s double wrapped and throwing
ClassCastExceptions
. I’m wondering if I’m missing something or it’s just some weird bug. https://gist.github.com/igor-brishkoski/4df636445358f85ca40d22e02b4a9b2d
c
Highly recommend using a library like this one instead of rolling your own: https://github.com/michaelbull/kotlin-result
i
On a first glance, doesn’t seem very Java friendly, but I’ll take a deeper look, thanks!