Skip to content

Commit

Permalink
Use seed.next for Success in Cogen for Try
Browse files Browse the repository at this point in the history
Fixes typelevel#285 (see discussion there).
  • Loading branch information
ceedubs committed Oct 21, 2016
1 parent 22a0b2d commit fbe35fe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/scala/org/scalacheck/Cogen.scala
Expand Up @@ -141,7 +141,7 @@ object Cogen extends CogenArities with CogenLowPriority {

implicit def cogenTry[A: Cogen]: Cogen[Try[A]] =
Cogen((seed: Seed, x: Try[A]) => x match {
case Success(a) => Cogen[A].perturb(seed, a)
case Success(a) => Cogen[A].perturb(seed.next, a)
case Failure(e) => Cogen[Throwable].perturb(seed, e)
})

Expand Down

0 comments on commit fbe35fe

Please sign in to comment.