Skip to content

Cannot cast Object to Future #14

@AlixBa

Description

@AlixBa

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions