Details

    • Type: Bug
    • Status: CLOSED
    • Priority: Major
    • Resolution: Duplicate
    • Affects Version/s: Scala 2.11.8
    • Fix Version/s: None
    • Component/s: Repl / Interpreter
    • Labels:
      None

      Description

      Enter the following sequence in the REPL:

      import scala.concurrent.Future
      import scala.concurrent.ExecutionContext.Implicits.global
      val f = Future

      { 4 / 0 }
      for (exc <- f.failed) println(exc)
      val f = Future { 4 / 2 }
      val f = Future { 4 / 0 }

      for (exc <- f.failed) println(exc)
      val f = Future

      { 4 / 0 }

      The last line will evaluate as:

      scala> val f = Future { 4 / 0 }

      f: scala.concurrent.Future[Int] = List()

      which is not possible as an empty list is not a Future.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                rfc1149 Samuel Tardieu
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: