Skip to content

Commit

Permalink
Merge pull request #287 from ceedubs/cogen-try
Browse files Browse the repository at this point in the history
Use seed.next for Success in Cogen for Try
  • Loading branch information
rickynils committed Oct 24, 2016
2 parents b84b5a0 + fbe35fe commit 28996d8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/scala/org/scalacheck/Cogen.scala
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,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 28996d8

Please sign in to comment.