You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@paulp said:
You can't make Promise covariant. You could almost make it CONTRAvariant. Please discuss this on a mailing list somewhere, we do not have the bandwidth to handle this sort of thing.
The type paramater on futures is covariant, promises are invariant (scala.concurrent.Promise).
I find myself having to do something similar a lot:
case class TheValue[+T](func: () => Future[T]) {
val promise = PromiseAny
val future = promise.future.asInstanceOf[Future[T]]
}
There might be a good way a
The text was updated successfully, but these errors were encountered: