From eeec10e57083df398db674a25e6dc503e5d90a9b Mon Sep 17 00:00:00 2001 From: xuwei-k <6b656e6a69@gmail.com> Date: Mon, 23 Apr 2018 23:26:09 +0900 Subject: [PATCH] partially revert #395 see https://github.com/rickynils/scalacheck/pull/395#issuecomment-383442015 --- src/main/scala/org/scalacheck/Cogen.scala | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/scala/org/scalacheck/Cogen.scala b/src/main/scala/org/scalacheck/Cogen.scala index 76e66c655..c8585d9c9 100644 --- a/src/main/scala/org/scalacheck/Cogen.scala +++ b/src/main/scala/org/scalacheck/Cogen.scala @@ -30,7 +30,11 @@ sealed trait Cogen[T] extends Serializable { object Cogen extends CogenArities with CogenLowPriority { - def apply[T](implicit ev: Cogen[T]): Cogen[T] = ev + // for binary compatibility + private[scalacheck] def apply[T](ev: Cogen[T]): Cogen[T] = ev + + // https://github.com/rickynils/scalacheck/pull/395#issuecomment-383442015 + def apply[T](implicit ev: Cogen[T], dummy: Cogen[T]): Cogen[T] = ev def apply[T](f: T => Long): Cogen[T] = new Cogen[T] { def perturb(seed: Seed, t: T): Seed = seed.reseed(f(t))