Hi, I’m about: <https://github.com/arrow-kt/arrow-...
# arrow-contributors
h
Hi, I’m about: https://github.com/arrow-kt/arrow-integrations/pull/28 I found problem to solve: In case of returning
IO<Nothing, A>
Kotlin compiler(??? or Jvm?) erases all information about generics in this class. If method returns
IO<E, A>
where E is any type but
Nothing
, generic info is kept. Retrofit integration needs generic info, because Retrofit is a runtime library. I’ve also tested merged into master suspend + Either integration and it fails in the same place. Do anyone has some more knowledge about bytecode representation of
Nothing
and why compiler/Jvm do that only for
Nothing
type? Below are photos with brakepoint on
adapterType = method.getGenericReturnType()
(HttpServiceMethod.java:62)
r
I believe the Nothing case would need to be handled manually for the Either encoder
s
you could also use
suspend fun getUser(): User
directly if you don't expect HTTP errors