Skip to content

Commit

Permalink
Fix code on Scala 2
Browse files Browse the repository at this point in the history
  • Loading branch information
travisbrown committed Dec 3, 2019
1 parent de2deb8 commit a0ea859
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/src/main/scala/cats/ApplicativeError.scala
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ trait ApplicativeError[F[_], E] extends Applicative[F] {
* `F[A]` values.
*/
def recover[A](fa: F[A])(pf: PartialFunction[E, A]): F[A] =
handleErrorWith(fa)(e => (pf.andThen(pure(_))).applyOrElse(e, raiseError(_)))
handleErrorWith(fa)(e => (pf.andThen(pure(_))).applyOrElse(e, raiseError[A](_)))

/**
* Recover from certain errors by mapping them to an `F[A]` value.
Expand Down

0 comments on commit a0ea859

Please sign in to comment.