Skip to content

Commit 8bfaab5

Browse files
committed
Issue typelevel#4631: Make Later covariant
Same as typelevel#937
1 parent 93b0148 commit 8bfaab5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

core/src/main/scala/cats/Eval.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ final case class Now[A](value: A) extends Eval.Leaf[A] {
157157
* by the closure) will not be retained, and will be available for
158158
* garbage collection.
159159
*/
160-
final class Later[A](f: () => A) extends Eval.Leaf[A] {
160+
final class Later[+A](f: () => A) extends Eval.Leaf[A] {
161161
private[this] var thunk: () => A = f
162162

163163
// The idea here is that `f` may have captured very large
@@ -206,7 +206,7 @@ object Eval extends EvalInstances {
206206
* so calling .value does not trigger
207207
* any flatMaps or defers
208208
*/
209-
sealed abstract class Leaf[A] extends Eval[A]
209+
sealed abstract class Leaf[+A] extends Eval[A]
210210

211211
/**
212212
* Construct an eager Eval[A] value (i.e. Now[A]).

0 commit comments

Comments
 (0)