JakeWharton/retrofit2-kotlin-coroutines-adapter

Using `Deferred` type with `BehaviorDelegate`?

Closed this issue · 4 comments

amiiy commented

Hi!
How can I use the Deferred<User> type with BehaviorDelegate? for example I can not run below code :
delegate.returningResponse(response).getUser();
returningResponse(response) actually returns User.

amiiy commented

sry. my bad.

@amiiy were you able to use Deferred adapter with BehaviorDelegate?

sry. my bad.

For real though - for some reason leaving suspend keyword on the function signature of the interface causes the delegate to see the return as Java::Object - instead of type deferred