Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion core/shared/src/main/scala/zio/Cause.scala
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ sealed abstract class Cause[+E] extends Product with Serializable { self =>
/**
* Folds over the cause to statefully compute a value.
*/
final def foldLeft[Z](z: Z)(f: PartialFunction[(Z, Cause[E]), Z]): Z = {
final def foldLeft[@specialized(Boolean) Z](z: Z)(f: PartialFunction[(Z, Cause[E]), Z]): Z = {
@tailrec
def loop(z: Z, cause: Cause[E], stack: List[Cause[E]]): Z =
(f.applyOrElse[(Z, Cause[E]), Z](z -> cause, _ => z), cause) match {
Expand Down