Hi! Does anyone know how I should be able to compa...
# coroutines
e
Hi! Does anyone know how I should be able to compare a return value with
COROUTINE_SUSPENDED
? I'm building an AOP-based logging interceptor and need to check if the return value of a reflective methodcall is
COROUTINE_SUSPENDED
🙂 Currently doing this by checking
if (result.toString() == "COROUTINE_SUSPENDED")
but it feels like I should be able to access the symbol directly..
l
I think retrofit2 code deals with that. Basically, you need to import the intrinsic, which the IDE will not suggest.
e
Thanks, I'll try to figure out how they manage to do that. Simply adding the import doesn't seem to be enough Nvm, I tried to import from
kotlinx.coroutines.intrinsics
instead of
kotlin.coroutines.intrinsics