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
{{ message }}
This repository has been archived by the owner on Apr 13, 2021. It is now read-only.
The following code taken verbatim from some documentation I'm trying to tut:fail
import concurrent.Future
import scala.concurrent.ExecutionContext.Implicits.global
def something[A](futL: Future[List[Int]])(f: Int => A): Future[List[A]] = for{
list <- futL
item <- list //won't compile since "list" isn't a Future and hence, doesn't compose!
} yield f(item)
gives me the following output:
[tut] *** Error reported at Transformers.md:17: failure was asserted but no failure occurred
import concurrent.Future
[tut] *** Error reported at Transformers.md:18: failure was asserted but no failure occurred
import scala.concurrent.ExecutionContext.Implicits.global
I'm assuming this is a bug or is it supposed to be overeager? Removing the :fail causes the expected compilation errors.
The text was updated successfully, but these errors were encountered:
Ah, yeah. Hell. The way it's written fail expects every statement in the block to fail. My tests were all examples with a single expression. For now you can fix it by breaking it into two blocks.
The following code taken verbatim from some documentation I'm trying to tut:fail
gives me the following output:
I'm assuming this is a bug or is it supposed to be overeager? Removing the
:fail
causes the expected compilation errors.The text was updated successfully, but these errors were encountered: