when I do this for example : ```return either { ...
# arrow
s
when I do this for example :
Copy code
return either { 
    MyDomainObject.left().bind()
}
IDE shows me this :
Returning type parameter has been inferred to Nothing implicitly. Please, specify type arguments explicitly to hide this warning. Nothing can produce an exception at runtime.
on v0.11.0 with arrow-fx-coroutines.
r
This is not related to fx Coroutines but the new inference in Kotlin. You can get rid of the warning by ascribing the type explicitly
s
Thank you 🙂 Yes. Just to thought ask anyway, to fish out if you have any other way where I don’t have to explicitly give the type 😅
For now I just suppressed it
a
In this case you cannot handle with explicit types either, the problem here is that
A.left()
gives you an
Either<A, Nothing>
so doing
bind()
here will always be cast to Nothing 🤷
I’d say it’s an expected behaviour inherent to how
bind()
works as it favours the “right” case 🙂
226 Views