Skip to content
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

Cannot cast Object to Future #14

Open
AlixBa opened this issue Sep 15, 2018 · 1 comment
Open

Cannot cast Object to Future #14

AlixBa opened this issue Sep 15, 2018 · 1 comment

Comments

@AlixBa
Copy link

AlixBa commented Sep 15, 2018

Hello, I'm running into this issue, not sure if I'm doing something wrong or not.

import $ivy.`io.trane::arrows-stdlib:0.1.22`
import arrows.stdlib._
import scala.concurrent._
import scala.concurrent.ExecutionContext.Implicits.global
import scala.concurrent.duration._

Await.result(Future.sequence(List(Future.firstCompletedOf(List(Future.successful(1))))), Duration.Inf)
// List(1)

Task.sequence(List(Task.firstCompletedOf(List(Task.async(Future.successful(1)))))).run(())
// java.lang.ClassCastException: java.base/[Ljava.lang.Object; cannot be cast to [Lscala.concurrent.Future;
//   arrows.stdlib.ArrowImpl$Sequence.runSync(ArrowImpl.scala:226)
//   arrows.stdlib.ArrowRun$.apply(ArrowRun.scala:186)
//   arrows.stdlib.Arrow.run(Arrow.scala:90)
@AlixBa
Copy link
Author

AlixBa commented Sep 15, 2018

Seems weird, I retested my script and it worked until...
capture d ecran 2018-09-15 a 11 40 03

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant