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

rkeazor

11/01/2020, 1:32 PM
Anyone know how to resolve the kotlin.Result classncast exception issue?
g

gildor

11/01/2020, 2:07 PM
Which version of Kotlin? There are a few known bugs related on inline classes, which were fixed in 1.4.20, we was not be able to update on 1.4.x because of them, but everything works fine on 1.4.20-m2
r

rkeazor

11/01/2020, 2:23 PM
1.4.0
g

gildor

11/01/2020, 2:28 PM
Yeah, I think it one of those issues You use suspend function with result, right?
r

rkeazor

11/01/2020, 2:29 PM
Yep
g

gildor

11/01/2020, 2:31 PM
We use 1.4.20-m2 in production now, so far so good
r

rkeazor

11/01/2020, 2:35 PM
Alright let me check. Thanks for the info
The fix was only introduce in 1.4.20 milestone 2? Not 1.4.10?
Sigh.. M2 , didnt resolve it 😔
g

gildor

11/01/2020, 3:01 PM
Yes, it's not fixed 1.4.10
Interesting, are you sure that everything is recompiled? Maybe some issue of incremental build, not everything is recompiled after update
r

rkeazor

11/01/2020, 5:19 PM
Yea. I think I understand the origin of the issue. I think it only happens when you wrap a java class in a result object ... and than call it in suspend
g

gildor

11/02/2020, 1:09 AM
wrap a java class? What do you mean?
r

rkeazor

11/02/2020, 2:48 AM
As In the Kotlin class is has a dependency on a generated java class
g

gildor

11/02/2020, 3:54 AM
not sure that it related
3 Views