-
Notifications
You must be signed in to change notification settings - Fork 87
Not Supported breakOut rewrite #93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
This breakOut is a no-op: def sequence[A, M[X] <: TraversableOnce[X]](in: M[Future[A]])(implicit cbf: CanBuildFrom[M[Future[A]], A, M[A]], executor: ExecutionContext): Future[M[A]]
def traverse[A, B, M[X] <: TraversableOnce[X]](in: M[A])(fn: (A) ⇒ Future[B])(implicit cbf: CanBuildFrom[M[A], B, M[B]], executor: ExecutionContext): Future[M[B]] The For example, this does not compile: import scala.concurrent.Future
import scala.concurrent.ExecutionContext.Implicits.global
Future.sequence(List(Future(1)))(breakOut, global): Future[Vector[Int]]
Future.traverse(List(1))(x => Future(x))(breakOut, global): Future[Vector[Int]]
// type mismatch;
// found : scala.concurrent.Future[List[Int]]
// required: scala.concurrent.Future[Vector[Int]]
// Future.sequence(List(Future(1)))(breakOut, global): Future[Vector[Int]]
// ^
// type mismatch;
// found : scala.concurrent.Future[List[Int]]
// required: scala.concurrent.Future[Vector[Int]]
// Future.traverse(List(1))(x => Future(x))(breakOut, global): Future[Vector[Int]]
// ^ It's possible to change the collection type: import scala.concurrent.Future
import scala.concurrent.ExecutionContext.Implicits.global
Future.sequence(List(Future(1)))(breakOut, global): Future[Seq[Int]]
Future.traverse(List(1))(x => Future(x))(breakOut, global): Future[Seq[Int]] |
MasseGuillaume
added a commit
to MasseGuillaume/scala-collection-compat
that referenced
this issue
Jul 19, 2018
MasseGuillaume
added a commit
to MasseGuillaume/scala-collection-compat
that referenced
this issue
Jul 19, 2018
MasseGuillaume
added a commit
to MasseGuillaume/scala-collection-compat
that referenced
this issue
Jul 19, 2018
MasseGuillaume
added a commit
to MasseGuillaume/scala-collection-compat
that referenced
this issue
Jul 20, 2018
MasseGuillaume
added a commit
to MasseGuillaume/scala-collection-compat
that referenced
this issue
Jul 20, 2018
MasseGuillaume
added a commit
to MasseGuillaume/scala-collection-compat
that referenced
this issue
Jul 23, 2018
MasseGuillaume
added a commit
to MasseGuillaume/scala-collection-compat
that referenced
this issue
Jul 23, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://github.com/akka/akka/blob/d76b27ba3ecf747743d1fc6abd3163f78c9c60d8/akka-persistence/src/main/scala/akka/persistence/snapshot/local/LocalSnapshotStore.scala#L76-L81
The text was updated successfully, but these errors were encountered: