https://kotlinlang.org logo
#coroutines
Title
# coroutines
b

bolot

10/24/2018, 9:36 PM
Has anybody run into an issue
kotlin.Result cannot be cast to MyType
? I'm trying to use
Result
with LiveData, doing something like this:
liveData.value = runCatching { useCase().await() }
, which is then used in
liveData.observe
as
result.onSuccess { } .onFailure { }
(Kotlin version 1.3.0-rc-190)
g

gildor

10/24/2018, 11:15 PM
There are still some known issues with Result
b

bolot

10/24/2018, 11:21 PM
Thank you!
Exactly the same issue. I'll use my own, non-inline Result class for now. Thanks again!
a

amatkivskiy

11/25/2018, 10:02 AM
Seems that this is more related to inline classes issue rather then to specific Result class.
💯 1
5 Views